This bug only found in Firefox browser, the version I use is Firefox 131.0.3 (64-bit).
Lexical version:
0.16.1, I also tried 0.19.0 still have this problem too.
Steps To Reproduce
Open an empty editor and insert only one or few horizontal rules nodes in the editor.
Remove all paragraph nodes from the editor, by moving cursor inside each node and press Backspace. Now, the editor will have only horizontal rules nodes as shown in the picture below.
Make the focus outside of the editor and try to focus back in the editor again. We won't be able to type in the editor again.
Or by running the Lexical project in your computer using version 0.16.1 - 0.19.0.
The current behavior
When insert only horizontal rules nodes in the editor and remove all paragraphs from it and make the focus outside of the editor and try to focus back to the editor again. We won't be able to type in the editor again.
The expected behavior
The user should be able to continue typing in the editor.
Impact of fix
Since this bug is easy to reproduce with only few steps, it may occasionally happen to some users using Lexical editor.
But when this happen, users will have no idea what to do next to continue working with the editor.
I think this is a moderate bug because when the user just insert only one or few horizontal rules nodes and accidentally remove all paragraphs for any reason, they will encounter this bug and can't do anything in the editor.
This bug only found in Firefox browser, the version I use is Firefox 131.0.3 (64-bit).
Lexical version: 0.16.1, I also tried 0.19.0 still have this problem too.
Steps To Reproduce
Open an empty editor and insert only one or few horizontal rules nodes in the editor.
Remove all paragraph nodes from the editor, by moving cursor inside each node and press Backspace. Now, the editor will have only horizontal rules nodes as shown in the picture below.
Make the focus outside of the editor and try to focus back in the editor again. We won't be able to type in the editor again.
Link to code example:
The current behavior
When insert only horizontal rules nodes in the editor and remove all paragraphs from it and make the focus outside of the editor and try to focus back to the editor again. We won't be able to type in the editor again.
The expected behavior
The user should be able to continue typing in the editor.
Impact of fix
Since this bug is easy to reproduce with only few steps, it may occasionally happen to some users using Lexical editor. But when this happen, users will have no idea what to do next to continue working with the editor.
I think this is a moderate bug because when the user just insert only one or few horizontal rules nodes and accidentally remove all paragraphs for any reason, they will encounter this bug and can't do anything in the editor.