Can someone help me understand why is this useful and when to use it?
$( "#sortable" ).disableSelection();
It's useful if you want to make text unselectable. If, for instance, you want to make drag-and-drop elements with text on, it'd be annoying to the user if the text on the box accidentally would get selected when trying to drag the box.
Caveat emptor: .disableSelection()
is actually harmful on some browsers, as it prevents clicking active elements (e.g. textarea
s) inside the sortable.
.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).disableSelection()
seems to have no effect whatsoever.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With