Skip to content

fix: prevent blocks from being outdented past zoom root in focused view#25

Closed
talentwill wants to merge 1 commit into
logseq:version/filefrom
talentwill:fix/outdent-past-zoom-root
Closed

fix: prevent blocks from being outdented past zoom root in focused view#25
talentwill wants to merge 1 commit into
logseq:version/filefrom
talentwill:fix/outdent-past-zoom-root

Conversation

@talentwill
Copy link
Copy Markdown

Fixes #24

Summary

When outdenting a block whose parent is the zoom root in focused view, the block would disappear. This adds a guard to skip outdent for blocks that are direct children of the zoom root, in both on-tab (Tab/Shift-Tab) and indent-outdent-aux! (keyboard shortcut) handlers.

Changes

  • on-tab: When outdenting, filter out blocks whose parent is the zoom root before performing the operation
  • indent-outdent-aux!: Skip the outdent operation entirely when the block's parent is the zoom root

Same fix as logseq/logseq#12583 in the DB version.

Test plan

  • Open a page with nested blocks
  • Zoom into a block
  • Select a direct child of the zoom root
  • Press Shift+Tab — block should NOT be outdented
  • Press Tab — block should still indent normally
  • Select a deeper nested block and press Shift+Tab — should outdent normally (one level at a time)

When outdenting a block whose parent is the zoom root in focused view,
the block would disappear. This adds a guard to skip outdent for blocks
that are direct children of the zoom root, in both Tab and Shift-Tab
handlers.
@tiensonqin tiensonqin closed this May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blocks disappear when outdented past zoom root in focused view

2 participants