Skip to content

Instantly share code, notes, and snippets.

@metatoaster
Last active November 4, 2020 04:41
Show Gist options
  • Save metatoaster/8cac96a316a538ada5f8343077509ccf to your computer and use it in GitHub Desktop.
Save metatoaster/8cac96a316a538ada5f8343077509ccf to your computer and use it in GitHub Desktop.
Fix Firefox accident-prone Ctrl+Q on not just Windows (force include shift modifier key) and make tabbox switchByScrolling actually work
diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc
Make quit shortcut be ctrl+shift+q
--- a/browser/base/content/browser-sets.inc
+++ b/browser/base/content/browser-sets.inc
@@ -299,11 +299,7 @@
<key id="key_sanitize_mac" command="Tools:Sanitize" keycode="VK_BACK" modifiers="accel,shift"/>
#endif
<key id="key_quitApplication" data-l10n-id="quit-app-shortcut"
-#ifdef XP_WIN
modifiers="accel,shift"
-#else
- modifiers="accel"
-#endif
# On OS X, dark voodoo magic invokes the quit code for this key.
# So we're not adding the attribute on OSX because of backwards/add-on compat.
# See bug 1369909 for background on this.
diff --git a/toolkit/content/widgets/arrowscrollbox.js b/toolkit/content/widgets/arrowscrollbox.js
If switch by scrolling is enabled, also require a ctrl modifier key
--- a/toolkit/content/widgets/arrowscrollbox.js
+++ b/toolkit/content/widgets/arrowscrollbox.js
@@ -648,6 +648,11 @@
if (!this.hasAttribute("overflowing")) {
return;
}
+ if (Services.prefs.getBoolPref(
+ "toolkit.tabbox.switchByScrolling",
+ false) && !event.ctrlKey) {
+ return;
+ }
let doScroll = false;
let instant;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment