Open
Description
Editing LinkNode cause another span to be created after the LinkNode, happens only if we start to add characters before the last character of the LinkNode.
Lexical version: 0.20.0
Steps To Reproduce
- open the provided CodeSandbox
- you will find a link already in the document "Lexical"
- put the cursor between 'a' and 'l' and start typing
- you will find that another span is been created after the linkNode, so 2 spans been updated at the same time
Link to CodeSandbox example:
https://stackblitz.com/edit/facebook-lexical-3ztsmofg?file=src%2Fmain.ts,package.json,src%2FprepopulatedRichText.ts
The current behavior
a new span been created and updated
The expected behavior
No spans been created just the current LinkNode been updated