fix(composer): mod+(a|x|c|v) always fall through to window

This commit is contained in:
Ben Gotow 2016-05-05 10:23:32 -07:00
parent ad706c0609
commit f037cf8e9f

View file

@ -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