improve: cursor drawing when page visible

This commit is contained in:
Hufe921
2023-07-17 21:34:29 +08:00
parent 3f03d88443
commit 9c2bd33b7a
+4 -1
View File
@@ -139,7 +139,10 @@ export class GlobalEvent {
private _handleVisibilityChange = () => { private _handleVisibilityChange = () => {
if (document.visibilityState) { if (document.visibilityState) {
this.cursor?.drawCursor() const isCollapsed = this.range.getIsCollapsed()
this.cursor?.drawCursor({
isShow: isCollapsed
})
} }
} }