fix(common): prevent support menu from triggering in editors (#5811)
This commit is contained in:
parent
fcf31a4fd8
commit
3c0938da9d
1 changed files with 16 additions and 0 deletions
|
|
@ -230,6 +230,22 @@ function handleKeyDown(ev: KeyboardEvent) {
|
||||||
return
|
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 no action is bound, do nothing
|
||||||
if (!boundAction) return
|
if (!boundAction) return
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue