Skip to content

[lexical-overflow] Make OverflowNode a proper inline element (revisit #6027 / #6535) #9454

Open

Description

@zurfyx

Summary

OverflowNode (@lexical/overflow, used by the character limit plugin) wraps the overflowing part of a paragraph's text, but its isInline() returns false. It behaves like an inline element while reporting itself as a block, so code that reasons about inline vs block content has to special-case it.

History

Why it matters now

Code that relies on a node's inline/block nature has to treat OverflowNode as an exception, for example a content-model normalization that lifts block elements out of paragraphs. With isInline() true, it would be an ordinary inline element and need no exemption.

Proposal

  1. Add e2e and unit tests for caret placement around LineBreakNode with the character limit active, in plain text and in rich text (Shift+Return, typing at the end, backspace across the boundary).
  2. Re-apply the Fix OverflowNode configuration #6027 change.
  3. Fix the selection or caret logic that misplaces the insertion point next to a trailing LineBreakNode inside an inline element.

Activity

  1. added a commit that references this issue on Oct 25, 2026
    46d1e96
  2. Vedthakar commented on Oct 25, 2026

    @Vedthakar
    Contributor

    I opened #9461 for this: OverflowNode is inline again, with the line break caret regression from #6535 fixed in the reconciler and in useCharacterLimit, plus tests for both.

    — Ved Thakar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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