Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable text selection on a jquery draggable?

I have several draggables on my page. When I start dragging one, it moves just fine, but the other elements on the page are getting highlighted/selected from my cursor.

I noticed that the draggle demos on the jquery UI website seemed to work just fine. Does anyone have any ideas why the text is being selected on my site during dragging?

This is the code I'm using (seems pretty standard to me):

$('.dragger').draggable(
{
 'helper': 'clone',
 'revert': true
});
like image 753
matt Avatar asked Dec 10 '22 13:12

matt


1 Answers

Check this demo sources, for example:

$("#sortable").disableSelection();

edit
A post from jquery forum explaining the situation around disableSelection. Looks like it's 'undocumented' for a long time already.

like image 176
Nikita Rybak Avatar answered Jan 12 '23 03:01

Nikita Rybak