fix(canvas): blur 类型断言,CI typecheck 通过

This commit is contained in:
qiqi committed 2026-11-22 20:51:06 +08:00
1 parent 3565b5aec2
commit cce51e6ccd
1 file changed
+2 -2
+2 -2
View File
@@ -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 */ }