SlickGrid
SlickGrid copied to clipboard
Fix for Cell text content selection in non IE Browsers
Small fix that make it possible to select and copy/past cell text content in non IE browsers. By default text selection within cells is disabled via the enableTextSelectionOnCells = false property. Apparently cell text selection only works correctly in IE - lines 266-271 of file slick.grid.js
// for usability reasons, all text selection in SlickGrid is disabled
// with the exception of input and textarea elements (selection must
// be enabled there so that editors work as expected); note that
// selection in grid cells (grid body) is already unavailable in
// all browsers except IE
disableSelection($headers); // disable all text selection in header (including input and textarea)
I added a change to the handleClick event listener that fix the problem in the other browsers.
Any status of this change? This worked for me (i.e fixes the issue of not being able to copy content from cells).
Hi, still waiting for feedback on the pull request or for it to be accepted in to the SlickGrid master branch.
Please add more details so that I can review it. How exactly is the problem manifested (repro steps)? How is your fix addressing the issue?
Good stuff man, it solved the issue for me, thanks.
This solved an issue for me. Thanks a ton!
This does however prevent key events from being handled.
I cannot merge this without an explanation of what this fixes and how.
Great job done.....
I am running into this issue too. I would like for my users of my application to be able to select text out of a grid and copy it to the clipboard such as in http://mleibman.github.io/SlickGrid/examples/example1-simple.html. Right now, when I highlight text in any cell using Firefox, the selection immediately disappears. I tried the above patch and it seems to resolve it. Is this the recommended approach or is there a more official fix already merged into SlickGrid?