ignore key action if posthog survey is focused (#13466)
This commit is contained in:
parent
8c32127a6f
commit
a044ba226a
|
@ -137,8 +137,12 @@
|
|||
const activeTag = document.activeElement?.tagName.toLowerCase()
|
||||
const inCodeEditor =
|
||||
document.activeElement?.classList?.contains("cm-content")
|
||||
const inPosthogSurvey =
|
||||
document.activeElement?.classList?.[0]?.startsWith("PostHogSurvey")
|
||||
if (
|
||||
(inCodeEditor || ["input", "textarea"].indexOf(activeTag) !== -1) &&
|
||||
(inCodeEditor ||
|
||||
inPosthogSurvey ||
|
||||
["input", "textarea"].indexOf(activeTag) !== -1) &&
|
||||
e.key !== "Escape"
|
||||
) {
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue