-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
copyFromContent not working with longer delay #102
Comments
I can't figure this one out. :( |
I wonder if this is a limitation of the clipboard service, where the "authorization" from the user (the click) has a time limit. |
This fleshes out the problem with execCommand a little more. I'm also seeing an issue when using the ClipboardService from within a promise where it isn't copying at all regardless of delay. This might be due to some security issues with it being a different thread to the click handler or something (see here). |
Subscribing to this. After an http request to an API, the clipboard doesn't work anymore. I figured it wont work normally but neither with the clipboard service? |
Indeed this is a bug, as the main reason to use the copyFromContent function is exactly to handle delays like this
|
I also noticed that
throws an error => "container.contains is not a function" here the container is "body" (string primitive type). html:
Am I missing something? |
Container expects a Dom node rather than a string. |
description
I want to copy text to the clipboard which comes from a delayed backend response. Now I tried many different ways to get the text into the clipboard but the command 'execCommand('copy') is not working in the ClipboardService. So I tried the basic functionality and everythings works fine. Then I added delays and when the delay is '2000' it is not able to set text into the clipboard anymore.
Now this hinders my implementation of a feature in our application.
AC
code example
I created a plunker with the basis of the given demo. Please follow this link: https://plnkr.co/edit/PPbwSkngc2QQzCHhNDZg?p=preview
The text was updated successfully, but these errors were encountered: