You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dragged items shift down relatively of the mouse pointer when dragging between 2 vertical grids #1210
Consider that you have 2 gridstacks : the first is on top of the second. If you drag a item from the 2nd grid to the 1st one then the 1st grid will grod to make room for the dragged item. The dragged item moves down and is not under the mouse pointer anymore.
Try to pick the item content 3 or content 4 and drop it in the first grid. See how the item captured by the drag and drop moves down when the first grid grows.
Expected behaviour
The dragged item should stay under the mouse pointer when the source grid (the 2nd) moves down due to the increased height of the first one.
Actual behaviour
The dragged item moves down relatively of the mouse pointer.
changed the title [-]Dragged items shift down relatively of the mouse pointer[/-][+]Dragged items shift down relatively of the mouse pointer when dragging between 2 vertical grids[/+]on Mar 20, 2020
updated to v3 html5 and the object DOES follow the cursor now (fixed) even when grid changes size, but due to #1433 and some repeated collision checks the item can be pushed down way too many times! so a different issue remains or I would close this
Activity
[-]Dragged items shift down the mouse pointer[/-][+]Dragged items shift down relatively of the mouse pointer[/+]adumesny commentedon Mar 13, 2020
you are using a very old gridstack 0.2.5. Please update to the latest rev (see current fiddle sample) and re-open if it still happens.
btry commentedon Mar 13, 2020
Hi
Here is an example forked from the template for issues : https://jsfiddle.net/t4suec3d/
adumesny commentedon Mar 13, 2020
thanks, here's a better tweak (float true, spaced out to see) on it https://jsfiddle.net/adumesny/63c7e4ps/
it appears the drag is relative to the (bottom) grid which gets pushed down when upper grid grows, instead of absolute global position.
Note that we also have (known) issues trying to drag items back to bottom grid (can't if float=true of course without a maxRow).
btry commentedon Mar 13, 2020
Yes I noticed this also, but this is somewhat workaround-able if the user moves fast the item to the bottom.
[-]Dragged items shift down relatively of the mouse pointer[/-][+]Dragged items shift down relatively of the mouse pointer when dragging between 2 vertical grids[/+]btry commentedon Nov 25, 2020
Hi
Issue still there with version 2.2.0
https://jsfiddle.net/moc5v3uy/
adumesny commentedon Dec 5, 2020
updated to v3 html5 and the object DOES follow the cursor now (fixed) even when grid changes size, but due to #1433 and some repeated collision checks the item can be pushed down way too many times! so a different issue remains or I would close this
https://jsfiddle.net/adumesny/63c7e4ps/
adumesny commentedon Jan 3, 2021
closing this issue as fixed in 3.1.3 (follows cursor in v3 Html5) and will open remaining issue.