lexical
lexical copied to clipboard
Bug: Link node at the end of paragraph is persisted when replacing the entire paragraph after it has been selected via triple-click
This can easily be reproduced in the lexical playground in Chrome.
- Create paragraph with a link node at the very end of the paragraph
- Copy some text
- Triple-click paragraph (do not click the link node). That way, the entire paragraph, including the link node at the end, is selected
- CMD+V - paste the selected text
Expected: Paragraph is replaced with selected text Bug: Only the paragraph up until the link node is replaced with selected text. The link node is persisted, despite being selected as well.
If the entire paragraph is selected using manual drag-selection, or if it's selected using double-click, it works as expected. This can only be reproduced when using triple-clicks.
https://github.com/facebook/lexical/assets/70709113/320c0883-834a-4c51-a85c-f286e865c55d