Outdenting a selection that spans 2 levels moves blocks deeper · Issue #1319 · logseq/db-test · GitHub
Skip to content

Outdenting a selection that spans 2 levels moves blocks deeper #1319

Open

Description

@yuxi-liu-wired

Steps

  1. On a page with blocks a (children a1; a2 with child a2x), b, c, d, click a2x, then Shift+click b. The selection holds a2x and b.
  2. Press Shift+Tab.

Expected

a2x moves up one level, to after a2 under a. b is already at the top level, so b, c and d stay where they are. Shift+Tab never moves a block deeper.

Actual

The page reads a (a1, a2, a2x, b (c, d)): b moves one level deeper, into a after a2x, and c and d, which were not selected, move 2 levels deeper, under b. With the setting "Logical outdenting" on, b still moves into a; c and d stay.

Cause

indent-outdent-blocks in deps/outliner/src/logseq/outliner/core.cljs outdents the selected blocks with take-while, which stops only at a block whose parent is the target parent. b sits above that level, so b is taken too and moved after a2. Default outdenting then moves the right siblings of the last moved block (b's old siblings c and d) under it.

Found with a model-based property test of outliner operations built as the UI builds them, replayed on upstream master 16c4ed1a0.

Activity

  1. yuxi-liu-wired commented on Oct 6, 2026

    @yuxi-liu-wired
    Author
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