impetus icon indicating copy to clipboard operation
impetus copied to clipboard

Right click on an element causes impetus to "stick"

Open jexe opened this issue 4 years ago • 2 comments

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.

jexe avatar Jun 11 '20 20:06 jexe

Should note that this is 100% repeatable in Chrome v83

jexe avatar Jun 11 '20 20:06 jexe

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();
})

jexe avatar Jun 11 '20 20:06 jexe