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

Nested grids: TypeError: e.currentTarget is null when using a touch device #2887

Closed
anatter opened this issue Dec 4, 2024 · 2 comments · Fixed by #2893
Closed

Nested grids: TypeError: e.currentTarget is null when using a touch device #2887

anatter opened this issue Dec 4, 2024 · 2 comments · Fixed by #2893

Comments

@anatter
Copy link

anatter commented Dec 4, 2024

Subject of the issue

Widgets can not be moved with nested grids in the nested grid demo https://gridstackjs.com/demo/nested.html
when using any touch device, mobile phone or laptop with touchscreen

Uncaught TypeError: e.currentTarget is null
    _mouseUp dd-draggable.ts:228
    destroy dd-draggable.ts:120
    cleanDraggable dd-element.ts:61
    draggable dd-gridstack.ts:74
    draggable dd-gridstack.ts:70
    _removeDD gridstack.ts:2077
    _setupAcceptWidget gridstack.ts:2314
    on dd-gridstack.ts:138
    triggerEvent dd-base-impl.ts:40
    drop dd-droppable.ts:145
    _mouseUp dd-draggable.ts:253
    _mouseDown dd-draggable.ts:151
    enable dd-draggable.ts:94
    enable dd-draggable.ts:93
    v dd-draggable.ts:79
    setupDraggable dd-element.ts:52
    draggable dd-gridstack.ts:79
    draggable dd-gridstack.ts:70
    _prepareDragDropByNode gridstack.ts:2465
    _prepareElement gridstack.ts:1698
    makeWidget gridstack.ts:1088
    addWidget gridstack.ts:492
    load gridstack.ts:774
    load gridstack.ts:745
    x gridstack.ts:432
    init gridstack.ts:112
    addGrid gridstack.ts:172
    makeSubGrid gridstack.ts:570
    makeWidget gridstack.ts:1095
    addWidget gridstack.ts:492
    load gridstack.ts:774
    load gridstack.ts:745
    x gridstack.ts:432
    init gridstack.ts:112
    addGrid gridstack.ts:172
    <anonymous> nested.html:80

Your environment

  • version of gridstack.js - v11
  • which browser/OS: Any browser, Windows 11,

Steps to reproduce

Expected behavior

  • Widgets should be movable
@adumesny
Copy link
Member

adumesny commented Dec 4, 2024

oh, that used to work. thanks for the heads up.

adumesny added a commit to adumesny/gridstack.js that referenced this issue Dec 9, 2024
* fix gridstack#2887
* make sure we check for null since dragging a child out will destroy the old one, doing a double cleaning.
@adumesny
Copy link
Member

adumesny commented Dec 9, 2024

fixed in next release.

don't forget to donate if you find this lib useful!

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