Skip to content

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

Closed

Description

@thamblin

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.

Activity

  1. adumesny commented on Jul 10, 2024

    @adumesny
    Member

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

  2. adumesny commented on Jul 14, 2024

    @adumesny
    Member

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

  3. added 2 commits that reference this issue on Jul 14, 2024
    91f8329
    e77dc3e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions