Skip to content

Bug: Reconciler does not insert a managed line break into ElementDOMSlot #9063

Description

@levensta

Lexical version: 0.49 latest

Steps To Reproduce

  1. Define an ElementNode with the getDOMSlot method
  2. Insert a node with text content into the editor
  3. Delete the text content

Link to code example: https://codesandbox.io/p/sandbox/3xpqzc

The current behavior

When a node with a DOM slot is empty, it lacks a managed line break, so node visually collapses as if it had been completely removed

Screen.Recording.2026-08-12.at.02.04.51.mov

The expected behavior

A managed line break is set if the DOMSlot is empty, similar to the standard DOM structure for an ElementNode

Impact of fix

It would be better if the managed line break were handled entirely by lexical

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions