gridstack / gridstack.js

Build interactive dashboards in minutes.
https://gridstackjs.com
MIT License
6.75k stars 1.28k forks source link

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

Closed thamblin closed 3 months ago

thamblin commented 3 months ago

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

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 commented 3 months ago

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

adumesny commented 3 months ago

this was introduced by this fix https://github.com/gridstack/gridstack.js/pull/2712 in 10.2.1 (10.2.0 where 'r' was added is fine)