From a044ba226a76f3a5960f4cae580967b4e01861d8 Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Thu, 11 Apr 2024 15:25:36 +0100 Subject: [PATCH] ignore key action if posthog survey is focused (#13466) --- .../_components/ComponentList/ComponentKeyHandler.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/ComponentList/ComponentKeyHandler.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/ComponentList/ComponentKeyHandler.svelte index 7e9c113a77..6b27d79c15 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/ComponentList/ComponentKeyHandler.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/ComponentList/ComponentKeyHandler.svelte @@ -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