From f037cf8e9ffe2a9a5d068e7e485fcccc58f596be Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Thu, 5 May 2016 10:23:32 -0700 Subject: [PATCH] fix(composer): mod+(a|x|c|v) always fall through to window --- src/keymap-manager.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/keymap-manager.coffee b/src/keymap-manager.coffee index d1406a42a..16ba9cb4d 100644 --- a/src/keymap-manager.coffee +++ b/src/keymap-manager.coffee @@ -12,7 +12,9 @@ Gmail's "x", while allowing standard hotkeys.) mousetrap.prototype.stopCallback = (e, element, combo, sequence) -> withinTextInput = element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable if withinTextInput - return /(mod|command|ctrl)/.test(combo) is false + isPlainKey = /(mod|command|ctrl)/.test(combo) + isReservedTextEditingShortcut = /(mod|command|ctrl)\+(a|x|c|v)/.test(combo) + return isPlainKey || isReservedTextEditingShortcut return false class KeymapManager