You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The caret gets stuck at the beginning of a paragraph and does not move to the previous element
cursor.stucks.before.shadow.root.mov
The expected behavior
The caret moves to the nearest available text-containing node, and the text after the caret is appended to it
Impact of fix
Similar behavior works in Notion and seems entirely expected. The only caveat is what happens if the last element in the shadow root is a decorator, such as an embed video. In this case, I see several options:
The caret stops at the paragraph and does not move anywhere.
The caret always jumps over any decorators and the text appends to the nearest available node (like in Notion)
Lexical version: 0.45 latest
Steps To Reproduce
Link to code example: https://playground.lexical.dev/#doc=H4sIAAAAAAAAE9WTT2_CMAzFv8s7Z6gdMFiOHDhP4jjtkDUGIoW4cl00hPrdp5T9K9MmbTtMnCLbes8_28oR5IOyrNQpwR4hzJrfahuiF0qw94PgwcAHoUoDJ9jUxmiwZtk5hQUMQvKUFLYw0ENNsKiduI24eguDPUnTC0sDpSddviiLU7jSQ8wSdOZrgv_A-XmbimN0dRMeI11p0EiDdt_P50ldiL3b-p1oxz4bp5yJMGhe6U6wsFgy4w2gzw16XsSuKk6ay38kP7d0IZGcTcF13rdKS5_O8dsLLJxc5AX6Xz9A7Qyia3Tl9uRhy9m8vJ3dXE_G8-nYoOFWqqy7i-6wEW6T_6hGMZpMRwW6ZxU_aJVeBAAA
The current behavior
The caret gets stuck at the beginning of a paragraph and does not move to the previous element
cursor.stucks.before.shadow.root.mov
The expected behavior
The caret moves to the nearest available text-containing node, and the text after the caret is appended to it
Impact of fix
Similar behavior works in Notion and seems entirely expected. The only caveat is what happens if the last element in the shadow root is a decorator, such as an embed video. In this case, I see several options: