lexical
lexical copied to clipboard
Bug: Editor lost its own selection when focus set inside external dialogs
Lexical version: 0.13.1
Steps To Reproduce
- Type any text.
- Click on 'Insert link' button.
- Wait until the dialog opens and sets focus.
- Click on 'Insert link' button a few times.
https://github.com/facebook/lexical/assets/3251933/4648471a-b677-4689-8db4-e359c82c361c
The current behavior
$getSelection()
returns null.
Facing same problem, +1
I've seen users add onMouseDown={(e) => e.preventDefault()}
to menu items to prevent losing editor focus/selection.
Obviously it would be nice if this wasn't an issue.