Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drag and drop issue in Chrome related to Windows scale (125%)

I have an issue with drag and drop on Chrome (v69.0.3497.100). Specifically, some of the drag and drop events are getting fired when Windows scaling is other than 100% even though they shouldn't be firing.

Check out stackblitz example, and try to drag "blue" rectangle over itself (just drag, move a little bit downwards and drop). If Windows scaling is set to 100% (browser zoom is 100% as well) then one event is fired (dragEnter) as expected (check the console). But, if Windows scaling is set to 125% (but browser zoom is still 100%) then three events are fired (two dragEnter and one dragLeave), and I expected only one event to be fired since the element was dragged and dropped on itself (as it was the case with 100% scale level).

It could be that since this is Windows zoom (and not browser's zoom) the left ("lightred") rectangle is larger that it appears, and it goes below right rectangle, and events are propagated to it, although I couldn't prove that since all elements have correct size in the inspector.

This doesn't seem to be happening in latest Firefox, IE or Edge.

Does anyone know why is this happening and how to fix it?

like image 949
miselking Avatar asked Sep 01 '25 21:09

miselking


1 Answers

There are instances where a website has drag-and-drop features that will not work inside the Google Chrome browser.

Fixing Drag-and-Drop

  1. Enter the following into the Google Chrome Top search bar. Chrome Flags: chrome://flags/

  2. Type Touch into the search bar and set the following options to Enabled.

enter image description here

like image 104
pr96 Avatar answered Sep 03 '25 11:09

pr96