Bug: Chrome can't set Cursor in Front of LexicalDecoratorNode
Author: danielberndtCreated Dec 6, 2024Updated Sep 25, 2026
Labelsselection
Lexical version: Playground
Steps To Reproduce
- Import this Lexcical State
{"editorState":{"root":{"children":[{"children":[{"equation":"a","inline":true,"type":"equation","version":1},{"type":"linebreak","version":1},{"equation":"b","inline":true,"type":"equation","version":1}],"direction":null,"format":"","indent":0,"type":"paragraph","version":1,"textFormat":0,"textStyle":""}],"direction":null,"format":"","indent":0,"type":"root","version":1}},"lastSaved":1733474696407,"source":"Playground","version":"0.21.0"}- Try to move the cursor in front of the second line
- On Chrome it will jump to the end of the first line
- This makes it impossible to add something in front of the second line
The current behavior
On Chrome:
https://github.com/user-attachments/assets/447ee59a-78bd-410d-b1ea-cc12365f7317
The expected behavior
On Firefox it works (despite the cursor being invisible)
https://github.com/user-attachments/assets/47c7b60f-be73-4a8e-8178-0b8f7ddae4c6
Impact
We're using LexicalDecoratorNode for @mentions and other types of references within our app. Not being able to set the cursor in front of those makes the experience a bit cumbersome.
Source: facebook/lexical