-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Why clipboard is blank? #288
Comments
Please share a JSFiddle, otherwise I cannot help. Thanks! |
@zenorocha my situation also produces a blank clip. The events output to console show correct Action, Text and Trigger but it clears the clipboard for me. I created a fiddle for you https://jsfiddle.net/jfrwe4eh/1/. I'm guessing it's because of special characters. |
Try to remove the style="display:none" from textarea, for me it looks like a security from browser. Maybe you need to position: absolute; left: bigNumber |
You were right, that works. Thank you. |
If you need to copy content but don't want to show an element on the UI you can use |
Hello, I still seem to have this issue. It sometimes copies a TAB or other large single white-space, but mostly doesn't overwrite what's in the clipboard. The event handler is working and your code in the console shows everything just fine, (Action, Text, Trigger all report just fine from on.success()), but nothing goes into the clipboard. I thought that the clipboard mechanism in my computer was screwed up because of Chrome/sharing and restarted the app and then the machine, but still does not work. I have also tested Firefox and it also does not work. |
@weaknetlabs please share a reproducible example using JSFiddle |
@zenorocha Sorry, it was definitely my computers at home. At work, it's working just fine. I remotely cleared my cache at home and made sure my CloudFlare proxy was in developer mode, but still happens at home. But here at work, I did the same and it's working! Sorry for the false alarm and thanks for the quick response! I need to look into why the clipboard was not working from Chrome at home. |
Cool, thanks for answering back! |
Hi guys! I try to use clipboard.js and I stumbled with strange behavior. I have this
and this
<button class="btn" id="copy-app-id" data-clipboard-target="a.chosen-single span">Copy</button>
but when I click on the button, nothing happens. Clipboard is empty. How fix it?
sorry for my bad English
The text was updated successfully, but these errors were encountered: