impetus
impetus copied to clipboard
Right click on an element causes impetus to "stick"
Right-clicking on an object causes impetus to start tracking the mouse movement and sending event updates. It does not stop tracking this until the user left clicks again.
To repro:
- Right click on an impetus source
- Click and release the left mouse button away from the context menu to make it disappear
- Move the mouse
What I expect is that the source doesn't receive event updates
What I experience, however, is impetus continues to send tracking events until the user left clicks and releases the mouse button again.
Should note that this is 100% repeatable in Chrome v83
It seems that you can work around this issue by pausing and resuming impetus when right click is detected:
$("#my-element").on("contextmenu", function (e) {
impetus.pause();
impetus.resume();
})