Prevent Paste but allow Copy (bug?)
Prevent Paste but allow Copy (bug?)
Description of problem:
When I select a cell the user needs to be able to copy the value to the clipboard but it needs to be read-only so it can't be changed. My table does this, however, if my user executes a clipboard paste it changes the cell value. How can I prevent this (bug?).
Link to test case:
To see what's happening just select a cell and paste some text.
https://datatables.net/extensions/keytable/examples/initialisation/events.html
This question has an accepted answers - jump to answer
Answers
Hi,
Not a bug, it just wasn't a feature. It was either clipboard (copy and paste) enabled or not. However, based on your post, I've just committed a change to allow copy and paste actions to be enabled independently - e.g.:
That will be included in the next release.
Allan