Skip to content

RichEditor: Can't remove empty quote placed at start of document #82

Open

Description

@vitonsky

Steps:

  • Create new note
  • Focus on rich editor
  • Insert quote
  • Press "back space"

Expected behavior:

  • Quote node removed

Actual behavior:

  • Nothing happened. Quote does not removes

Activity

  1. added
    bugSomething isn't working
    scope:editorRelated to any editor features
    on Dec 3, 2024
  2. katsyuta commented on Jul 6, 2026

    @katsyuta
    Collaborator

    I think we can close this issue, because this behavior implemented correctly

    q-fixed.mp4

    Here i pressed to backspace and quote is deleted

  3. vitonsky commented on Jul 6, 2026

    @vitonsky
    MemberAuthor

    @katsyuta what about invariants? Maybe if we already have some text, or something like this

  4. katsyuta commented on Jul 6, 2026

    @katsyuta
    Collaborator

    I checked the quote behavior with text and the nested empty quote — it works fine.
    For this markdown it does work bad

    > foo
    > > bar
    

    When the cursor is placed on the bar line and delete all the text using backspace, the nested quote is not deleted. Instead, the cursor moves to the foo line. I can remove the empty nested quote only if place the cursor on that line and press backspace

    We need a test for this behavior

  5. katsyuta commented on Aug 14, 2026

    @katsyuta
    Collaborator

    I tested the quote behavior and found the following problems:

    1. For an empty quote preceded by an empty line pressing Backspace deletes the empty line instead of the quote
    2. For an empty nested quote trying to decrease the nesting level deletes the entire quote string

    How it must be work:

    When Backspace is pressed at the beginning of a quote:

    • an empty quote should be deleted
    • a non-empty top-level quote should be converted to a regular paragraph
    • a nested quote should have its nesting level decreased
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

    bugSomething isn't workingscope:editorRelated to any editor features

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions