mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-15 22:29:03 +08:00
fix(composer): mod+(a|x|c|v) always fall through to window
This commit is contained in:
parent
ad706c0609
commit
f037cf8e9f
1 changed files with 3 additions and 1 deletions
|
@ -12,7 +12,9 @@ Gmail's "x", while allowing standard hotkeys.)
|
||||||
mousetrap.prototype.stopCallback = (e, element, combo, sequence) ->
|
mousetrap.prototype.stopCallback = (e, element, combo, sequence) ->
|
||||||
withinTextInput = element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable
|
withinTextInput = element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable
|
||||||
if withinTextInput
|
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
|
return false
|
||||||
|
|
||||||
class KeymapManager
|
class KeymapManager
|
||||||
|
|
Loading…
Reference in a new issue