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

Locked widgets are still moveable by other widgets #1181

Closed
ritox842 opened this issue Mar 4, 2020 · 4 comments · Fixed by #1219
Closed

Locked widgets are still moveable by other widgets #1181

ritox842 opened this issue Mar 4, 2020 · 4 comments · Fixed by #1219
Labels

Comments

@ritox842
Copy link

ritox842 commented Mar 4, 2020

Subject of the issue

When setting widgets into a locked mode and adding new widgets above it the widgets are been pushed down including the locked widgets.

Your environment

  • 1.1.0 (was 0.5.3)
  • Chrome 80.0.3987.122

Steps to reproduce

I've added a locked widget. Adding new widgets above it will eventually push the locked widget down.
https://jsfiddle.net/ritox/f5w8beyt/7/

Expected behaviour

A locked widget should never move under no circumstances. It should hold it's position and new widgets the collide with it should be put below it

Actual behaviour

New widgets push the locked widget down.

@adumesny
Copy link
Member

adumesny commented Mar 4, 2020

thank you for submitting a simple test case. Now we can take a look.

@ritox842
Copy link
Author

@adumesny
Can you please update about this issue?

adumesny added a commit to adumesny/gridstack.js that referenced this issue Mar 16, 2020
* make sure `_fixCollisions()` take node locked state into account
* `moveNode()` also checks for locked state, but resize can still happen
(forced for column layout change)
* added demo and test case showing issue
* fix gridstack#1181
@adumesny
Copy link
Member

fixed in next release.

@ritox842
Copy link
Author

Thanks ! :)

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