Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ShihHsuanChen opened this issue Sep 8, 2022 · 2 comments · Fixed by #2035
Closed
Labels

Comments

@ShihHsuanChen
Copy link

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

@adumesny
Copy link
Member

adumesny commented Sep 8, 2022

good one. DDManager.overResizeElement was rencently tweaks to prevent nested grid from having parent and child both show it. But that logic need to tackle items being removed,loaded,destroyed... thanks

@adumesny
Copy link
Member

adumesny commented Sep 8, 2022

fixed in 6.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants