Skip to content

Calling removeWidget makes resize handler of all grid-stack-item no longer visible #2034

@ShihHsuanChen

Description

@ShihHsuanChen

Subject of the issue

As title, after I calling grid.removeWidget(el) the resize handler in the .grid-stack-item of all .grid-stack-item (at least in the same grid-stack) become no longer visible. But this issue not always happens on grid.removeWidget(el) call. Here I test three conditions:

  1. The mouse in the to-be-removed .grid-stack-item or its children elements when grid.removeWidget(el) called
    --> issue happened
  2. The mouse in the other .grid-stack-item when grid.removeWidget(el) called
    --> normal
  3. The mouse not in any .grid-stack-item when grid.removeWidget(el) called
    --> normal

I check elements and event listeners before/after issue happened

  • class ui-resizable-autohide in the .grid-stack-item elements cannot be removed when mouse in the element
  • the .ui-resizable-handle element still exists
  • no event listeners are removed

Your environment

  • gridstack == 6.0.1
  • Google Chrome 103.0.5060.53
  • OS: both windows 10 / ubuntu 18.04

Steps to reproduce

  1. Open official demo page column() grid demo (fix cellHeight)
  2. click x on any block

Expected behavior

resize handler shown

Actual behavior

resize handler not shown

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions