Skip to content

Dragged items shift down relatively of the mouse pointer when dragging between 2 vertical grids #1210

Closed

Description

@btry

Subject of the issue

Hi

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.

Your environment

  • gridstack 0.6.0
  • Firefox 73.0.1 64 bits (Debian Sid)

Steps to reproduce

Here is an example: https://jsfiddle.net/wjdhn6uy/

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.

Activity

  1. changed the title [-]Dragged items shift down the mouse pointer[/-] [+]Dragged items shift down relatively of the mouse pointer[/+] on Mar 13, 2020
  2. adumesny commented on Mar 13, 2020

    @adumesny
    Member

    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.

  3. btry commented on Mar 13, 2020

    @btry
    Author

    Hi

    Here is an example forked from the template for issues : https://jsfiddle.net/t4suec3d/

  4. adumesny commented on Mar 13, 2020

    @adumesny
    Member

    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).

  5. btry commented on Mar 13, 2020

    @btry
    Author

    Note that we have (known) issues trying to drag items back to bottom grid (can't if float=true of course without a maxRow).

    Yes I noticed this also, but this is somewhat workaround-able if the user moves fast the item to the bottom.

  6. 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
  7. btry commented on Nov 25, 2020

    @btry
    Author

    Hi

    Issue still there with version 2.2.0

    https://jsfiddle.net/moc5v3uy/

  8. adumesny commented on Dec 5, 2020

    @adumesny
    Member

    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/

  9. adumesny commented on Jan 3, 2021

    @adumesny
    Member

    closing this issue as fixed in 3.1.3 (follows cursor in v3 Html5) and will open remaining issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions