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

Using alt-tab causes alt modifier to get stuck and breaks tools interaction #317

Open
doepnern opened this issue Nov 28, 2022 · 1 comment

Comments

@doepnern
Copy link
Contributor

Hey, I noticed that using alt-tab in chrome on Windows to switch tabs will cause the alt modifier to get stuck as no keyup event is registered, which will break any tools that use mouseclick or mousemove for example. You should be able to reproduce this in any of the examples that use any mouseTools. I don't know if there is a good way to handle this, just wanted to let you know as I got quite confused why my the tools seem to get stuck some times

@doepnern
Copy link
Contributor Author

https://github.com/cornerstonejs/cornerstone3D-beta/blob/b80ea407eaa59da10fe06d0794b0356416410fdc/packages/tools/src/eventDispatchers/keyboardToolEventDispatcher.ts#L9-L12

I just added this for now in enable and disable
window.addEventListener('focusin', resetModifierKey);
window.removeEventListener('focusin', resetModifierKey);

wayfarer3130 pushed a commit that referenced this issue Jan 20, 2023
…dd "frameNumber" to the Annotation.data (#317)

* add "frameNumber" to the Annotation.data

* remove default value of frameNumber, as someone might not want it intentionally
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