Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Can't continue typing in the editor when it has only horizontal rules nodes. #6775

Open
metinhomsin opened this issue Oct 28, 2024 · 1 comment

Comments

@metinhomsin
Copy link

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

  1. Open an empty editor and insert only one or few horizontal rules nodes in the editor.
    Screenshot 2024-10-28 155433

  2. 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.
    Screenshot 2024-10-28 155514

  3. 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:

  • You can try to reproduce this bug on official Lexical Playground website: https://playground.lexical.dev/.
  • 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.

@potatowagon
Copy link
Contributor

Screen.Recording.2024-10-30.at.3.38.41.PM.mov

im still able to type after focusing outside the editor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants