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 */ }