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): prevent support menu from triggering in editors (#5811)
Leonic3c0938da9d55
diff --git a/packages/hoppscotch-common/src/helpers/keybindings.ts b/packages/hoppscotch-common/src/helpers/keybindings.tsindex af49df6c7..a1a048f54 100644--- a/packages/hoppscotch-common/src/helpers/keybindings.ts+++ b/packages/hoppscotch-common/src/helpers/keybindings.ts@@ -230,6 +230,22 @@ function handleKeyDown(ev: KeyboardEvent) {return}+ // Special handling for shift-/ (support menu) - don't trigger in editors or inputs+ if (binding === "shift-/") {+ const target = ev.target++ if (!isDOMElement(target)) return++ // Let editors and inputs handle it normally (user is just typing "/")+ if (+ isCodeMirrorEditor(target) ||+ isMonacoEditor(target) ||+ isTypableElement(target)+ ) {+ return+ }+ }+// If no action is bound, do nothingif (!boundAction) return