dojo / dojo/dojo

Using delay on Moveable creates possible ignored move

Open
#322 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.6k
Forks
543
Avg merge
1d 9h
Merged PRs (30d)
1

Description

By listening to the "onMouseMove" on the handle, it's possible to have the moveable ignore the user's move request when a delay value is set.
https://github.com/dojo/dojo/blob/ef0ed4e6776386bc91a90a55f98bcd2871ea16db/dnd/Moveable.js#L83

For an extreme example, set a delay greater than the dimensions of a moveable item's handle. Since it only listens for the "onMouseMove" event over its handle and the handle is smaller than the delay, no amount of moving will trigger a move.

A proposed solution is to set the mouse move listener on this.handle.ownerDocument (like is being done for the "onMouseUp" event [line 84]. Doing so will allow the moveable to eventually wake up and start moving the node.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.