Skip to content

Minor issue where the second line in an ordered list cannot be deleted #1417

Closed
logseq/logseq
#13658

Description

@mehori

Search first

  • I searched and no similar issues were found

What Happened?

There is a minor issue in the editor for version 2.0.2 where a block cannot be deleted using delete/backspace when a second line in an ordered list is created. Checked with 2.0.1 and confirmed that this issue was introduced in 2.0.2

Reproduce the Bug

  1. Type the first line in a ordered list (like this one).
  2. Press ENTER and type in the second line.
  3. Now try to delete the second line using backspace. The ordered list returns to a bullet but the block cannot be deleted.
  4. The behaviour persists until ESC or ENTER is pressed to remove focus or create a new line.

Expected Behavior

Hitting delete on the second line should delete the block and move the cursor to the end of the first line.

Screenshots

Snapzy_Recording_2026-10-09_21-28-08.mov

Desktop or Mobile Platform Information

The issue appears on the Desktop (macOS), iOS app, and test.logseq.com all under version 2.0.2
The issue did not appear on the macOS desktop version of 2.0.1

Additional Context

Checking the code with Claude pointed to line 2939 of src/main/frontend/handler/editor.cljs.

Bug: In an empty numbered-list block, the first Backspace removes the numbering, which is expected. But every Backspace after that tries to remove the numbering again, so the block never gets deleted.

Cause: delete-block-when-zero-pos! checks own-order-number-list? against :editor/block. That value is saved when editing starts, so it still has :logseq.property/order-list-type after the first Backspace removed it.

(if (own-order-number-list? block)

should be:

(if (own-order-number-list? (latest-renderer-block block))

Which resolved the issue in my local build.

Are you willing to submit a PR? If you know how to fix the bug.

  • I'm willing to submit a PR (Thank you!)

Activity

  1. transferred this issue fromlogseq/logseqon Oct 9, 2026
  2. yuxi-liu-wired commented on Oct 27, 2026

    @yuxi-liu-wired

    Fixed in logseq/logseq#13890 (fix(editor): collapse arrow, ordered-list Backspace, date picker Enter and selection bar actions). Its description has the cause and the test that pins it; it fails on current master and passes with the fix.

  3. added 5 commits that reference this issue on Oct 28, 2026
    4c2930e
    79828ab
    5a384f8
    9c95dae
    8b5bce5
  4. added 8 commits that reference this issue on Nov 11, 2026
    9a7514e
    2479f86
    a9ca55f
    05a5227
    68cff34
    d776ccd
    132e810
    a6a294d
  5. added a commit that references this issue on Nov 19, 2026
    5920973
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