fix: prevent blocks from being outdented past zoom root in focused view#25
Closed
talentwill wants to merge 1 commit into
Closed
fix: prevent blocks from being outdented past zoom root in focused view#25talentwill wants to merge 1 commit into
talentwill wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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) andindent-outdent-aux!(keyboard shortcut) handlers.Changes
on-tab: When outdenting, filter out blocks whose parent is the zoom root before performing the operationindent-outdent-aux!: Skip the outdent operation entirely when the block's parent is the zoom rootSame fix as logseq/logseq#12583 in the DB version.
Test plan