Skip to content

Commit f5b6b47

Browse files
author
Vi Nguyen
committed
fix
1 parent 5496b37 commit f5b6b47

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

packages/roosterjs-content-model-plugins/lib/touch/TouchPlugin.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export class TouchPlugin implements EditorPlugin {
6161
case 'pointerDown':
6262
this.isDblClicked = false;
6363
this.isTouchPenPointerEvent = true;
64+
this.editor.setEditorStyle(HIDE_CURSOR_CSS_KEY, CARET_CSS_RULE);
6465

6566
const targetWindow = this.editor.getDocument()?.defaultView || window;
6667
if (this.timer) {
@@ -70,11 +71,13 @@ export class TouchPlugin implements EditorPlugin {
7071
this.timer = targetWindow.setTimeout(() => {
7172
this.timer = 0;
7273

73-
if (!this.isDblClicked && this.editor) {
74-
repositionTouchSelection(this.editor);
74+
if (this.editor) {
75+
if (!this.isDblClicked) {
76+
repositionTouchSelection(this.editor);
7577

76-
// reset values
77-
this.isTouchPenPointerEvent = false;
78+
// reset values
79+
this.isTouchPenPointerEvent = false;
80+
}
7881
this.editor.setEditorStyle(HIDE_CURSOR_CSS_KEY, null);
7982
}
8083
}, POINTER_DETECTION_DELAY);

0 commit comments

Comments
 (0)