Skip to content

A platform for community discussion. Free, open, simple.

FIX: Skip keypress event if alt key is down

Vinoth Kannanf896d6b0219f
diff --git a/vendor/assets/javascripts/mousetrap.js b/vendor/assets/javascripts/mousetrap.js
index 6e28146130d..b2a79743e9a 100644
--- a/vendor/assets/javascripts/mousetrap.js
+++ b/vendor/assets/javascripts/mousetrap.js
@@ -575,8 +575,8 @@
//
// chrome will not fire a keypress if meta or control is down
// safari will fire a keypress if meta or meta+shift is down
- // firefox will fire a keypress if meta or control is down
- if ((action == 'keypress' && !e.metaKey && !e.ctrlKey) || _modifiersMatch(modifiers, callback.modifiers)) {
+ // firefox will fire a keypress if meta, alt or control is down
+ if ((action == 'keypress' && !e.altKey && !e.metaKey && !e.ctrlKey) || _modifiersMatch(modifiers, callback.modifiers)) {
// when you bind a combination or sequence a second time it
// should overwrite the first one. if a sequenceName or