ngx-clipboard icon indicating copy to clipboard operation
ngx-clipboard copied to clipboard

document.execCommand(‘cut’/‘copy’) was denied because it was not called from inside a short running user-generated event handler

Open codafish-gmbh opened this issue 4 years ago • 2 comments

When using Firefox 68.10.0esr (64-Bit) Version and trying to copy a value to the clipboard the console shows the following error message:

document.execCommand(‘cut’/‘copy’) was denied because it was not called from inside a short running user-generated event handler.

We use Angular v6 and ngx-clipboard v10.

We would be very happy if someone could give us a hint why this happens and how we could avoid this issue.

codafish-gmbh avatar Aug 04 '20 23:08 codafish-gmbh

try to ask in Stackoverflow I think your issue is not related to ngx-clipboard.

maxisam avatar Aug 05 '20 15:08 maxisam

I have run into this as well and I think it is the same issue as #102 only that firefox is better at telling you what the issue is. There appears to be some limitation of execCommand where it won't work if not within x time of the user's last interaction.

rooby avatar Jul 13 '21 02:07 rooby