SortableGridField icon indicating copy to clipboard operation
SortableGridField copied to clipboard

disableSelection should be avoided.

Open martinviolet88 opened this issue 1 year ago • 2 comments

The use of disableSelection should be avoided, when using inline editting(https://github.com/symbiote/silverstripe-gridfieldextensions) the function prevents selecting text and textareafields. https://api.jqueryui.com/disableselection/

Schermafbeelding 2023-03-20 om 18 48 23

" Caveat emptor: .disableSelection() is actually harmful on some browsers, as it prevents clicking active elements (e.g. textareas) inside the sortable.

Firefox 33.1 for Mac OS X (Yosemite): .disableSelection() prevents clicking on embedded textarea; doesn't seem to have any effect otherwise (i.e. it is still impossible to select text with the mouse in the sortable if omitted) Chrome 39.0.2171.71 (64-bit) for Mac OS X: .disableSelection() seems to have no effect whatsoever. "

martinviolet88 avatar Mar 20 '23 17:03 martinviolet88

This can be turned off by setting the 2nd parameter to new GridFieldSortableRows() to false. That said I'll add this to the list to default it to false in a future release.

UndefinedOffset avatar Mar 20 '23 17:03 UndefinedOffset

Thanks for the response.

martinviolet88 avatar Mar 20 '23 17:03 martinviolet88