fix(canvas): blur 类型断言,CI typecheck 通过
This commit is contained in:
1 parent
3565b5aec2
commit
cce51e6ccd
1 file changed
+2
-2
@@ -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 */ }
|
||||
|
||||
Reference in new issue
Block a user