Skip to content

Hotkeys not working after triggering print dialog #509

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

Open
trygve-aaberge-adsk opened this issue Feb 19, 2025 · 1 comment
Open

Hotkeys not working after triggering print dialog #509

trygve-aaberge-adsk opened this issue Feb 19, 2025 · 1 comment

Comments

@trygve-aaberge-adsk
Copy link

If you trigger the print dialog from a shortcut, the keyup listener for that shortcut will never be triggered. That causes all other shortcuts to stop working because it thinks the key pressed for the print dialog is still being held down.

This happens at least in Chrome 133.0.6943.35. In Firefox 134.0.2 it sends the window focus event when the print dialog is dismissed, which makes it reset the key state, so it doesn't happen there.

Here's some code to reproduce it: https://codepen.io/trygveaa/pen/gbOPwrv

Press a and see that the press and release handlers are working. Then press ctrl+p and you will get the print dialog. Close it and press a again and see that no handlers are called.

@zhao-bocheng
Copy link

I had the same problem when using Windows, but no problem when using Mac

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

2 participants