Repository navigation
Commit 893475b
committed
fix(app): fix cursor position after pasting multi-line text
Remove document.execCommand('insertText') which creates DIV block
elements for multi-line paste. getCursorPosition doesn't count the
implicit newlines at block boundaries, causing cursor to land in the
middle of pasted text after re-render.
Now always uses addPart() which inserts via createTextFragment
(text nodes + BR tags, no block elements), ensuring correct cursor
positioning. Also removes deprecated execCommand API usage.1 parent a53f407 commit 893475b
1 file changed
Lines changed: 0 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | 106 | | |
116 | 107 | | |
117 | 108 | | |
| |||
0 commit comments