Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
codafish-gmbh opened this issue Aug 4, 2020 · 2 comments

Comments

@codafish-gmbh
Copy link

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.

@maxisam
Copy link
Owner

maxisam commented Aug 5, 2020

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

@rooby
Copy link

rooby commented Jul 13, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants