copying to clipboard issue
copying to clipboard issue
samirll
Posts: 7Questions: 1Answers: 0
Hello everyone,
I am using copy button on my reports. The issue I am facing is that on some page it says x number of rows are copied to clip board while on some other pages it says '' Press ctrl or ⌘ + C to copy the table data to your system clipboard.To cancel, click this message or press escape"
I am not sure what and where is the issue. I need the auto copy feature and don't want the user to press ctrl + c.
Any idea? how an I fix this issue?
Regards
Sami
This discussion has been closed.
Answers
Do you have keyboard activation enabled on those buttons?
https://datatables.net/extensions/buttons/examples/initialisation/keys.html
Kevin
@kthorngren No I don't have as such settings here is my code:
@allan need your help.
This may explain your issue:
https://datatables.net/reference/button/copyHtml5
Sounds like its browser dependent on whether that message appears. Looks like you are using the latest buttons version.
Kevin
I am using the same code and same browser for these pages. On some pages it works while on few others it doesn't.
Can you link to the two pages please so it can be debugged?
The "press cmd+c" message will be shown if there is an error when executing the execCommand. If that is failing we'd need to be able to debug the page to understand why that is happening.
One possibility is the amount of data in the table, but again, we'd really need a link to the page.
Allan
Hey @allan those are admin pages. I may not be able to share it publically. any other thoughts?
At the very least you have to explain the details of the differences between the relevant pages.
Another option is to remove that try/catch in the code and see what the exception says.
edit Or use a breakpoint in there, which is what I would have done with access to the page.
@allan removing the try and catch don't have any impact on the behavior and do not provide any information. but the amount of data is also not an issue. It has something with the processing of data.
@tangerine I am trying to figure out the difference between segments of code.
Without any way to reproduce the issue I'm afraid there isn't really anything I can do to help other than to generically suggest debugging it. I haven't come across anyone else reporting this so it isn't a known issue with a known solution I'm afraid.
Allan
Sorry, my english is very bad. I've same problem. The origin of my problem is the virtual memory. Increase the size of virtual memory of your computer.
I correct. In my case it is not the virutal memory, but it seems that it is the memory that the operating system reserves to the clipboard application, when it is full it gives this error. On different computers, it shows me this error with different number of records for the same query.