Dragable <div>. Struggle with choice

I am developing my own simple js lib for drag and drop <div>

When I drag it, I often select the text under <div>.

http://jsfiddle.net/Sw7Ty/

Obviously, this is something (text selection) that I don't want.

This happens on Google Chrome.

(In FireFox, I have another problem that I will ask in another thread)

WORK CODE

working code: http://jsfiddle.net/6Kwd4/

+4
source share
1 answer

Hi, do some quick tests on your jsfiddle:

therefore I think of him e.preventDefault(); in mouseXXX events.

+5
source

Source: https://habr.com/ru/post/1531968/


All Articles