fix(common): prevent support menu from triggering in editors (#5811)

This commit is contained in:
Leonic 2026-02-03 19:16:08 +01:00 committed by GitHub
parent fcf31a4fd8
commit 3c0938da9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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