bevacqua / dragula

:ok_hand: Drag and drop so simple it hurts
https://bevacqua.github.io/dragula/
MIT License
21.89k stars 1.97k forks source link

Click is detected as short drag in Chrome & windows 10 #524

Closed ranst91 closed 3 years ago

ranst91 commented 6 years ago

Description: When using chrome & windows 10 (or clicking 1 element and than quickly clicking the draggable & clickable element, in any other browser/OS) clicking on an item is detected as a 1 pixel (or less) drag, causing a drag behaviour when the user intends to click.

Expected behaviour: Short drags should not be considered as drag, but as click.

Steps to reproduce: This bug is available on Dragula demo! Go to https://bevacqua.github.io/dragula/ and choose the "Click or Drag" section. Using windows 10 & chrome (I used virtualbox to reproduce it) try moving the mouse around and clicking the items. You should get the expected behaviour (actual click is detected) only 50% of the time

Browsers/OS affected: Can be easily reproduced on Windows 10 + Chrome(latest). Also tested using Chrome(latest) & mac OS (latest)

deprecatednw commented 6 years ago

Hi. This issue is fixed by the changes from pr https://github.com/bevacqua/dragula/pull/502/files. But I have fixed via mouse offset. Delay option imho is not a good solution

ranst91 commented 6 years ago

Either of these should be configurable and the user should be able to choose (considering how easy the 2 are implemented)

henev commented 6 years ago

+1

dcantatore commented 3 years ago

PR #502 being added to next release