Skip to content

Auto scroll not working when you are dragging a widget and at bottom or top of the screen. #2032

@HammadKhaan

Description

@HammadKhaan

Subject of the issue

In previous versions of gridstack (at least 2.2.0), I had to implement the auto scroll when I am dragging a widget and at bottom or top of the screen, I added the below mention code in my options :
draggable: { handle: '.grid-stack-item-content', scroll: true, appendTo: 'body', }
After adding this, the auto scroll working fine whenever you are at bottom or top of the screen dragging a widget downward or upward.

But, in newer version of library (v6.0.1) the above mention code doesn't work for auto scroll, either you have to use mouse scroll or have to do back and forth motion to scroll. If this is a bug or something I am missing, because the older version was working completely fine.

Environment

Version 6.0.2
Windows OS
Google Chrome Browser

Steps to reproduce

gridstack.scroll.issue.mp4

If you could see, I am not able to drag a widget downward, and had to do back and forth to do the downward scrolling.

Expected behavior

Whenever I am at the bottom or top of the screen and dragging a widget downward or upward respectively, the screen should be scrolling automatically. Which is the behavior in previous versions.

Actual behavior

Currently the screen doesn't move when you are at bottom or top of the screen dragging a widget.

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