Closed serey-roth closed 3 weeks ago
I CAN reproduce this issue with a Table, Page Break, Divider, Collapsible Section, I CANNOT reproduce with Excalidraw, Poll, Image. It's not tables specific, so I can confirm it's not TableSelection specific, it's much lower down the selection stack.
Would be nice to get @etrepum 's view on this one as well, to me it seems like a quite significant selection issue.
Tbh I think selection has a lot of broken edge cases when it's not a RangeSelection of text. Haven't recently taken a close look at any of them.
https://www.loom.com/share/78508267145b422081498fe08c461626?sid=13463229-4383-4ec6-80d2-741805a691c7
Lexical version: 0.17
Steps To Reproduce
The current behavior
Both the table and the second paragraph are selected.
The expected behavior
Only the table should be selected.
Impact of fix
focusNode
being the last cell. However, when theselectionchange
event fires, the DOM selection now includes the next element after the table.