fix(common): ignore shift keybindings in CodeMirror editors (#5794)
This commit is contained in:
parent
05875cc65b
commit
65046526f0
1 changed files with 2 additions and 2 deletions
|
|
@ -262,11 +262,11 @@ function generateKeybindingString(ev: KeyboardEvent): ShortcutKey | null {
|
||||||
|
|
||||||
// All key combos backed by modifiers are valid shortcuts (whether currently typing or not)
|
// All key combos backed by modifiers are valid shortcuts (whether currently typing or not)
|
||||||
if (modifierKey) {
|
if (modifierKey) {
|
||||||
// If the modifier is shift and the target is an input, we ignore
|
// If the modifier is shift and the target is an input or codemirror editor, we ignore
|
||||||
if (
|
if (
|
||||||
modifierKey === "shift" &&
|
modifierKey === "shift" &&
|
||||||
isDOMElement(target) &&
|
isDOMElement(target) &&
|
||||||
isTypableElement(target)
|
(isTypableElement(target) || isCodeMirrorEditor(target))
|
||||||
) {
|
) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue