Skip to content

Bug: Unexpected Paragraph after deletion of new lines #7789

Closed

Description

@taweber-acn

Lexical version: v0.34.0

Steps To Reproduce

  1. Go to Lexical Playground
  2. Clear Editor
  3. type "foo", press ENTER two times, type "bar"
  4. press arrow up
  5. press delete
  6. type "x" while cursor is before "bar"

The current behavior

foo
x
bar

The expected behavior

foo
xbar

Activity

  1. etrepum commented on Sep 2, 2025

    @etrepum
    Collaborator

    The reason this happens is because the selection isn't normalized correctly when the forwards delete (fn+delete on macOS) occurs, the selection is between the paragraphs rather than at the start of the second paragraph. Should be a straightforward fix in the handler for forward delete.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions