Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Right click on an element causes impetus to "stick" #54

Open
jexe opened this issue Jun 11, 2020 · 2 comments
Open

Right click on an element causes impetus to "stick" #54

jexe opened this issue Jun 11, 2020 · 2 comments

Comments

@jexe
Copy link

jexe commented Jun 11, 2020

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
Copy link
Author

jexe commented Jun 11, 2020

Should note that this is 100% repeatable in Chrome v83

@jexe
Copy link
Author

jexe commented Jun 11, 2020

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

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

No branches or pull requests

1 participant