Skip to content

Conversation

@jemunk
Copy link

@jemunk jemunk commented Nov 17, 2025

Description

Fixed this touch issue happening on Linux device with touch screen running the application under Electron (Chromium):
When user starts dragging an item, as soon finger leaves the element, _mouseLeave is run, called from @dd-touch.js simulating mouse event. But on next move, _mouseEnter is run even though pointer has not reentered the element. _mouseEnter is not called by @dd-touch.js as part of simulating mouse, but is called as a real mouse event by browser. Strange part is that event.screenX from the _mouseEvent argument, gives a coordinate that matches where finger started dragging, not the coordinate of where the finger left the element.

Checklist

  • Created tests which fail without the change (if possible)
  • All tests passing (yarn test)
  • Extended the README / documentation, if necessary

…nning the application under Electron:

When user starts dragging an item, as soon finger leaves the element, _mouseLeave is run, called from @dd-touch.js simulating mouse event. But on next move, _mouseEnter is run even though pointer has not reentered the element. _mouseEnter is not called by @dd-touch.js as part of simulating mouse, but is called as a real mouse event by browser. Strange part is that event.screenX from the _mouseEvent argument, gives a coordinate that matches where finger started dragging, not the coordinate of where the finger left the element.
@adumesny adumesny merged commit 8205378 into gridstack:master Nov 17, 2025
@adumesny
Copy link
Member

thanks for the fix!

@jemunk
Copy link
Author

jemunk commented Nov 18, 2025

Thanks for merging. Do you have an idea of when it will be available on NPM?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants