Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
fix(common): ignore shift keybindings in CodeMirror editors (#5794)
Leonic65046526f04f
diff --git a/packages/hoppscotch-common/src/helpers/keybindings.ts b/packages/hoppscotch-common/src/helpers/keybindings.tsindex 636b0f658..af49df6c7 100644--- a/packages/hoppscotch-common/src/helpers/keybindings.ts+++ b/packages/hoppscotch-common/src/helpers/keybindings.ts@@ -262,11 +262,11 @@ function generateKeybindingString(ev: KeyboardEvent): ShortcutKey | null {// All key combos backed by modifiers are valid shortcuts (whether currently typing or not)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 ignoreif (modifierKey === "shift" &&isDOMElement(target) &&- isTypableElement(target)+ (isTypableElement(target) || isCodeMirrorEditor(target))) {return null}