Thanks to visit codestin.com
Credit goes to github.com

Skip to content

OnChange event not triggered correctly due to scrollbar show up #2823

Open
@quick691fr

Description

@quick691fr

Subject of the issue

OnChange event not triggered correctly when scrollbar shows up after dragging a widget on bottom of grid.

It seems coming from the scrollbar which modify the clientWidth and then trigger a BatchUpdate on onResize method since prevWidth !== el.clientWidth (of course the scrollbar shows up). the saveInitial methof then erase previous _orig and _dirty flag.

Your environment

gridstack.js v 10.3.1
Brave v1.70.126

Steps to reproduce

https://jsfiddle.net/drp0jbf5/41/

If you move pink item 3 half under cyan 4 with both right side of blocks aligned, or move pink item 3 under all other to the side of orange block item 2 then the onChange event ifs not triggered.

chrome-extension-nlipoenfbbikpbjkfpfillcgkoblgpmj-setup-react-html-from-install.webm

Expected behavior

The onChangeEvent should be triggered on every move of a widget.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions