SortableJS / Sortable

Reorderable drag-and-drop lists for modern browsers and touch devices. No jQuery or framework required.
https://sortablejs.github.io/Sortable/
MIT License
29.59k stars 3.7k forks source link

scaled screen causes error #1405

Open maztch opened 5 years ago

maztch commented 5 years ago

With a scaled screen, on start drag, sortable elements flips on start drag. Seems a problem with element positions.

Only can reproduce this on windows10 with screen setting scale at 125% (in screen config) and chrome. Then, in javascript, window.devicePixelRatio is decimal.

Currently our workaround is set the forceFallback config to true:

forceFallback: window.devicePixelRatio % 1 > 0

(we have a canvas inside the sortable, that's why we prefer the default clone.)

owen-m1 commented 5 years ago

I cannot reproduce this