Skip to content

Dragging between two (H5) grids sometimes does not remove underlying node #1612

Closed

Description

@infime

Subject of the issue

Moving an item between two grids is not behaving as expected and leaving behind underlying nodes in the source grids engine. This is possibly related to / could be solved by containment being implemented in H5 dd.

Your environment

  • 3.3.0 H5
  • Chrome 86.0.4240.111

Steps to reproduce

Reproducable on https://gridstackjs.com/demo/two.html# by dragging an item from the left grid to the right grid, with the mouse somewhere on the right side of the item. This seems to occasionally trigger a race condition that causes and a placeholder for the item in both grids simultaneously.

Expected behavior

The underlying node should be correctly removed from the original grid.

Actual behavior

  • gridstack.engine.nodes of the left grid does not remove the item.
  • save() of the left grid contains the removed element.
  • If the item is dropped back into the left grid, gridstack.engine.nodes will have duplicated the item. Causing strange resize/move and save()/load() behavior.

Activity

  1. adumesny commented on Feb 3, 2021

    @adumesny
    Member

    does this happen if jq version is used ? wonder if this was introduced recently...

    I ran into this last night while debugging/fixing #1578 , which is related to long standing #393

  2. adumesny commented on Mar 8, 2021

    @adumesny
    Member

    fixed in v4 (complete re-write)

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions