Skip to content

Commit b4ec3d3

Browse files
committed
fix(json-crdt-peritext-ui): 🐛 on double-click make sure the focus is in front
1 parent 2a5cdd8 commit b4ec3d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/json-crdt-peritext-ui/web/dom/CursorController.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ export class CursorController implements UiLifeCycles, Printable {
107107
ev.preventDefault();
108108
et.move(
109109
[
110-
['start', 'word', -1],
111-
['end', 'word', 1],
110+
['anchor', 'word', -1],
111+
['focus', 'word', 1],
112112
],
113113
[at],
114114
);
@@ -126,8 +126,8 @@ export class CursorController implements UiLifeCycles, Printable {
126126
this.mouseDown.next(false);
127127
ev.preventDefault();
128128
et.move([
129-
['start', 'word', -1],
130-
['end', 'word', 1],
129+
['anchor', 'word', -1],
130+
['focus', 'word', 1],
131131
]);
132132
break;
133133
case 3:

0 commit comments

Comments
 (0)