Skip to content

Can't drop on the parent grid when dragging in a new widget from a source inside a grid item/widget #3448

Closed

Description

@abdalla-rko

Subject of the issue

If a drag-in source is placed inside a grid widget, dragging from it doesn't work properly. The widget can't be dropped on the root(parent) grid, even though that grid has acceptWidgets: true. No placeholder appears and releasing the mouse to drop does nothing.

Two workarounds make the drop work:

  1. Drag the item outside the parent grid, then drag it back in.
  2. Drag the item into a nested sub-grid first then move it back onto the parent grid.

After either one the parent grid shows the placeholder and accepts the drop.

Your environment

  • version of gridstack.js: v14.0.0
  • which browser/OS: Chrome & WSL

Steps to reproduce

  1. Use the attached nested.html(modified from demo/nested.html) setup and add a drag-in source as the content of a root-grid widget

nested.html

  1. Start dragging "Drag new widget" inside the widget of the root grid.
  2. Move it over an empty area of the root grid and release.
  3. Nothing is dropped and no placeholder appears.
  4. Start again, but move the cursor outside the root grid or over nested grid before coming back to the root grid.
  5. Now the drop works.

See attached video

drag-issue2.mp4

Expected behavior

The root grid should show the placeholder and accept the drop as soon as the dragged item is over it. You shouldn't have to leave the grid or pass over a sub-grid first.

Activity

  1. adumesny commented on Nov 4, 2026

    @adumesny
    Member

    real bug, but my shape-based change already fixes it in #3451 #3454 , so PR #3449 isn't needed. It also conflicts with my changes.

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