From 76095cc3c36d40431b29125630566e84f221096d Mon Sep 17 00:00:00 2001 From: Atul Bhatt <38177419+atulbhatt-system32@users.noreply.github.com> Date: Mon, 18 Dec 2023 14:23:51 +0530 Subject: [PATCH] Prevent default action when not editing --- src/components/main/stageView/iFrame/hooks/useCmdk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/main/stageView/iFrame/hooks/useCmdk.ts b/src/components/main/stageView/iFrame/hooks/useCmdk.ts index a519dcb5..78c09393 100644 --- a/src/components/main/stageView/iFrame/hooks/useCmdk.ts +++ b/src/components/main/stageView/iFrame/hooks/useCmdk.ts @@ -123,7 +123,7 @@ export const useCmdk = ({ } } - action && e.preventDefault(); + !isEditingRef.current && action && e.preventDefault(); }, [osType, cmdkReferenceData], );