fix(common): ignore shift keybindings in CodeMirror editors (#5794)

This commit is contained in:
Leonic 2026-01-23 10:05:02 +01:00 committed by GitHub
parent 05875cc65b
commit 65046526f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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