From 25b0aa20a439f9d885502dcac33db9aa77377868 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 26 Dec 2022 15:58:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E4=BB=AA=E8=A1=A8=E6=9D=BF=E5=BF=AB=E6=8D=B7=E9=94=AE?= =?UTF-8?q?=E4=B8=8E=E6=B5=8F=E8=A7=88=E5=99=A8=E5=BF=AB=E6=8D=B7=E9=94=AE?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BC=98=E5=85=88?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E6=9D=BF=E7=BC=96=E8=BE=91=E5=8C=BA=E5=BF=AB?= =?UTF-8?q?=E6=8D=B7=E9=94=AE=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/utils/shortcutKey.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/canvas/utils/shortcutKey.js b/frontend/src/components/canvas/utils/shortcutKey.js index 258c862030..1c0688e91e 100644 --- a/frontend/src/components/canvas/utils/shortcutKey.js +++ b/frontend/src/components/canvas/utils/shortcutKey.js @@ -53,11 +53,12 @@ export function listenGlobalKeyDown() { window.onkeydown = (e) => { if (!store.state.isInEditor) return const { keyCode } = e + e.preventDefault() + e.stopPropagation() if (keyCode === ctrlKey || keyCode === commandKey) { isCtrlOrCommandDown = true } else if (isCtrlOrCommandDown) { if (keyCode === zKey || keyCode === yKey || keyCode === dKey || keyCode === sKey || keyCode === enlargeKey) { - e.preventDefault() unlockMap[keyCode]() } }