Move up on a selection spanning 2 journal pages moves a block into the other page · Issue #1318 · logseq/db-test · GitHub
Skip to content

Move up on a selection spanning 2 journal pages moves a block into the other page #1318

Open

Description

@yuxi-liu-wired

Steps

  1. Give today's journal the blocks a, b, c, and yesterday's journal the blocks e, f.
  2. On the Journals page, Ctrl+click a, then Ctrl+click e (Cmd+click on macOS).
  3. Press Alt+Shift+Up (Cmd+Shift+Up on macOS).

Expected

Each block moves up within its own page, which here moves nothing, since a and e are the first blocks of their pages. A block never changes page on a move up.

Actual

e leaves yesterday's journal and lands in today's journal right after a, above b and c. Clicking e first, then a, moves a into yesterday's journal instead.

Cause

move-blocks-up-down in deps/outliner/src/logseq/outliner/core.cljs computes one target from the first selected block and moves the whole selection there. For a block at the top of a page, the guard (not= (:db/id (:block/page first-block-parent)) (:db/id left-left)) compares the page's :block/page, which is nil, with the page itself, so it passes, and the call moves every selected block to the top of the first block's page. The UI handler editor/move-up-down does not restrict the selection to 1 page.

Found with a model-based property test of outliner operations built as the UI builds them (Ctrl+click selections in any order), 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