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
Nothing happens. The KEY_ENTER_COMMAND handler registered by registerRichText bails out at the $isRangeSelection(selection) guard — for a NodeSelection it just returns false. There is no paragraph to type into, and the keyboard has no way out of the NodeSelection state.
2026-05-18.4.21.26.mov
The expected behavior
A new empty paragraph should be inserted after the decorator and the caret should land in it, so the user can keep typing — matching the common pattern in other editors where pressing Enter on a selected block creates a new line below it.
Impact of fix
Whenever a user removes the surrounding paragraphs of a block decorator (image, YouTube, etc.), the editor becomes uneditable from the keyboard. The fix is small (a NodeSelection branch in the rich-text Enter handler) and unblocks an otherwise common state.
Lexical version:
0.44.0 (latest main, commit e65fcd7)
Steps To Reproduce
https://www.youtube.com/watch?v=dQw4w9WgXcQ)Link to code example: https://playground.lexical.dev/
The current behavior
Nothing happens. The
KEY_ENTER_COMMANDhandler registered byregisterRichTextbails out at the$isRangeSelection(selection)guard — for a NodeSelection it just returnsfalse. There is no paragraph to type into, and the keyboard has no way out of the NodeSelection state.2026-05-18.4.21.26.mov
The expected behavior
A new empty paragraph should be inserted after the decorator and the caret should land in it, so the user can keep typing — matching the common pattern in other editors where pressing Enter on a selected block creates a new line below it.
Impact of fix
Whenever a user removes the surrounding paragraphs of a block decorator (image, YouTube, etc.), the editor becomes uneditable from the keyboard. The fix is small (a NodeSelection branch in the rich-text Enter handler) and unblocks an otherwise common state.