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

Fix / as shortcut key in Firefox, prevent arrow shortcuts from triggering browser behaviors #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kirbysayshi
Copy link

/ in firefox is a Find in Page shortcut, which revoked focus from the
page. And at least for me, Arrows + cmd + shift was triggering scroll
behaviors in a Tree Tab extension I run (tabs as a list to the side).
Since that and other behaviors are hard to predict, I think it's best to
always preventDefault() once it's clear that a known shortcut is going
to be triggered.

This should also fix #37 ! This behavior was one of the first I encountered upon playing around with the app 😢

Thanks for making a cool Tracker app! I plan to use it for some JS13k experiments 😎

@kirbysayshi kirbysayshi changed the title fix: allow / as shortcut key in Firefox, prevent arrow shortcuts from triggering browser behaviors Fix / as shortcut key in Firefox, prevent arrow shortcuts from triggering browser behaviors Aug 21, 2022
@@ -14,4 +14,4 @@ zzfxV=.3;
zzfxR=44100;

// zzfxX - the common audio context
zzfxX=new(top.AudioContext||webkitAudioContext);
zzfxX=new(window.AudioContext||webkitAudioContext);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This happened just from building the app, I assume it's a leftover from #26 .

…iggering browser behaviors

/ in firefox is a Find in Page shortcut, which revoked focus from the
page. And at least for me, Arrows + cmd + shift was triggering scroll
behaviors in a Tree Tab extension I run (tabs as a list to the side).
Since that and other behaviors are hard to predict, I think it's best to
always preventDefault() once it's clear that a known shortcut is going
to be triggered.

Update tracker with latest zzfx from cb07fa9
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

Successfully merging this pull request may close these issues.

slash key is a hotkey in firefox
1 participant