Hi,
Am developing a firefox web extension and facing issues with copying to clipboard.
On clicking a button, I copy a text to clipboard and this is working. On timeout, I have to clear the clipboard, so I will copy an empty string to clipboard.
Now the issue is, when I use document.execCommand(‘copy’) inside setTimeout, am getting the following error
> document.execCommand(‘cut’/‘copy’) was denied because it was not called from inside a short running user-generated event handler.
I have added clipboardWrite and clipboardRead permissions in manifest.json. And still facing the issue.
Can someone help me with this? Thanks in advance.