JQuery error dragging text

I'm not sure if this is a mistake, but in this example there is no way to select the text under the elements that can be dragged.

The same problem with form elements.

http://jqueryui.com/demos/draggable/handle.html

Any ideas?

+4
source share
2 answers

If you look at the source code of this page, you will see that it calls

$("div, p").disableSelection(); 

... which explicitly disables the selection on all div and p on the page, including those under the drag and drop elements.

+9
source

The "official" jQuery way is to use .disableSelection (). However, often in practice this does absolutely nothing. In this case, you can pin all the text on the page with

 document.onselectstart = function () { return false; } 
+2
source

All Articles