9 ms·
I don't know about other browsers, but Webkit/Safari only allows writing to the clipboard when triggered by a user interaction. Copied from https://webkit.org/
by teichmann 6y ago
I don't know about other browsers, but Webkit/Safari only allows writing to the clipboard when triggered by a user interaction.
Copied from https://webkit.org/blog/10855/async-clipboard-api/ https://webkit.org/blog/10855/async-clipboard-api/:
"The request to write to the clipboard must be triggered during a user gesture. A call to clipboard.write or clipboard.writeText outside the scope of a user gesture (such as click or touch event handlers) will result in the immediate rejection of the promise returned by the API call."
- leokennis 6y agoThat is reassuring to hear, thanks for digging that up