[ACCEPTED]-What is disableSelection used for in jQuery UI?-jquery-ui
Accepted answer
It's useful if you want to make text unselectable. If, for 5 instance, you want to make drag-and-drop 4 elements with text on, it'd be annoying 3 to the user if the text on the box accidentally 2 would get selected when trying to drag the 1 box.
Caveat emptor: .disableSelection()
is actually harmful on some 2 browsers, as it prevents clicking active 1 elements (e.g. textarea
s) inside the sortable.
- Firefox 33.1 for Mac OS X (Yosemite):
.disableSelection()
prevents clicking on embeddedtextarea
; 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.
jQuery documentation says to not use it 2 http://api.jqueryui.com/disableselection/
Also, I found that it made elements with 1 contenteditable="true"
no longer editable.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.