You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
Thanks for noticing this. IMO it actually shall stick to root and stay there. Why? How else can you insert something before that code block? :)
Also cursor shall be placed before code block
It's turely work when we want to add text before code block, but it doesn't clear to tell user "now we can insert text before code block!" when focus the root element.
Because it seems exactly the same.
In my situation, my solution is when user pressing arrow up key, it will insert a paragraph before directly.
CleanShot-2024-04-27-at-10.49.49.mp4
Speaking of which, why do I raise this question? It's to ensure that the focus can be correctly disengaged at the beginning of my editor (not the application shown in the video above).
Example
It's like we have a form, which has input , and a lexical editor, I want the user to be able to navigate between them by pressing the up arrow key.
However, the behavior differs when we focus on the code block, quote and offset is set to 0, it will make the code I write become complex, I believe this is an area that could be improved.
So I suggest, the selection can not be switch to the root element.
Lexical version:
Steps To Reproduce
CleanShot-2024-04-26-at-17.37.29.mp4
The current behavior
You'll notice that the selection switches back and forth between the text node and the root node
The expected behavior
Just focus the text node only
The text was updated successfully, but these errors were encountered: