Skip to content

Invalid drag offset when page scrolled after 9.3 #2491

@AdrienClairembault

Description

@AdrienClairembault

Subject of the issue

Trying to move widgets while the page is scrolled down lead to unexpected behavior.
It seems there is a noticeable vertical offset between the mouse position and the widget position, which get worse the lower you scroll down the page.
While at the top of the page (no scroll), there is no issue.

Example:

gridstack

Your environment

Official demo: https://gridstackjs.com/demo/
Latest release is 9.3.0 at this date, which I suppose the demo is using.

Steps to reproduce

  • Open https://gridstackjs.com/demo/float.html
  • Move or expand the existing widget toward the bottom of the page to expand the available height as much as possible
  • Add another widget
  • Move the new widget around while the page is not scrolled, which should work as expected without issues
  • As soon as you start scrolling down the page, moving the widget around no longer work as expected (there is a noticeable vertical offset between the mouse position and the widget position).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions