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

Rotation causes an error in the console (10.2.1+) #2734

Closed
thamblin opened this issue Jul 10, 2024 · 2 comments · Fixed by #2737
Closed

Rotation causes an error in the console (10.2.1+) #2734

thamblin opened this issue Jul 10, 2024 · 2 comments · Fixed by #2737

Comments

@thamblin
Copy link

thamblin commented Jul 10, 2024

Subject of the issue

When rotating an item there is an error swapping the axis:

utils.ts:593 Uncaught TypeError: Cannot read properties of undefined (reading 'w')
    at t.swap (utils.ts:593:76)
    at e._keyEvent (dd-draggable.ts:311:13)

This also results in the grid becoming locked when dropping the item.

Your environment

  • version of gridstack.js - starts being an issue in 10.2.1
  • which browser/OS - checked chrome/firefox

Steps to reproduce

Go to the docs (currently on version 10.3.0) start dragging any non equal width/height item and hit 'r'.

Expected behavior

The grid should not lock, and no error should be produced.

@adumesny
Copy link
Member

weird, that used to work (breaks in float.html demo as well) even though I just added it. thanks.

@adumesny
Copy link
Member

adumesny commented Jul 14, 2024

this was introduced by this fix #2712 in 10.2.1 (10.2.0 where 'r' was added is fine)

adumesny added a commit to adumesny/gridstack.js that referenced this issue Jul 14, 2024
* fix  gridstack#2734
* this was introduced by another fix in 10.2.1
@adumesny adumesny mentioned this issue Jul 14, 2024
3 tasks
adumesny added a commit to adumesny/gridstack.js that referenced this issue Jul 14, 2024
* fix  gridstack#2734
* this was introduced by another fix in 10.2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants