From cce51e6ccd0b5bedcc28e2a102555dbb0388c011 Mon Sep 17 00:00:00 2001 From: qiqi Date: Sun, 22 Nov 2026 20:51:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(canvas):=20blur=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=96=AD=E8=A8=80=EF=BC=8CCI=20typecheck=20=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/runtime-workbench-logic.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime-workbench-logic.js b/src/runtime-workbench-logic.js index f4baa4b..f1d8662 100644 --- a/src/runtime-workbench-logic.js +++ b/src/runtime-workbench-logic.js @@ -891,7 +891,7 @@ // pointerup 可能没走到画布,refs.bodyDown/box 会残留 ⇒ 第一次点击节点被当成「收尾」。 try { refs.bodyDown = null; refs.groupDown = null; refs.drag = null; refs.box = null; refs.pan = null - const ae = document.activeElement + const ae = /** @type {any} */ (document.activeElement) if (ae && typeof ae.blur === 'function') ae.blur() if (window.getSelection) window.getSelection().removeAllRanges() } catch (e) { /* ignore */ } @@ -1117,7 +1117,7 @@ // refs.bodyDown/box 等临时手势会残留,导致「第一次点节点」被当成收尾(点不动/选中文本)。 try { refs.bodyDown = null; refs.groupDown = null; refs.drag = null; refs.box = null; refs.pan = null - const ae = document.activeElement + const ae = /** @type {any} */ (document.activeElement) if (ae && typeof ae.blur === 'function') ae.blur() if (window.getSelection) window.getSelection().removeAllRanges() } catch (e) { /* ignore */ }