From 3c0938da9d55209b29c5163cc164f8eae37aa56d Mon Sep 17 00:00:00 2001 From: Leonic <88329746+Leon-Luu@users.noreply.github.com> Date: Tue, 3 Feb 2026 19:16:08 +0100 Subject: [PATCH] fix(common): prevent support menu from triggering in editors (#5811) --- .../hoppscotch-common/src/helpers/keybindings.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/hoppscotch-common/src/helpers/keybindings.ts b/packages/hoppscotch-common/src/helpers/keybindings.ts index af49df6c..a1a048f5 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 nothing if (!boundAction) return