Repository navigation
Commit f6b231b
committed
fix(web): fast typing no longer scrambles text when type-to-focus kicks in
When the composer is blurred, the first keystroke is redirected into the draft and the editor
is focused a frame later. That focus used a bare DOM focus, which leaves the native caret at
the start of the editor until ProseMirror resyncs it about 20ms later. Voice dictation tools
such as whisrs type faster than that, so the next keys landed ahead of the redirected text
("Testing 1, 2, 3." became ", 3.Testing 1, 2").
Focus through ProseMirror's view.focus(), which writes the state selection to the DOM as it
focuses, so the caret is at the end before the next key arrives.1 parent 3896914 commit f6b231b
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
1154 | | - | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
1155 | 1159 | | |
1156 | 1160 | | |
1157 | 1161 | | |
| |||
0 commit comments