Skip to content

Floating toolbar tags only the earlier selection after Shift+Down expands it #1391

Open

Description

@tiensonqin

What happened

The floating selection toolbar's # (Tags) action can operate on an earlier selection after the blue block selection has been expanded with Shift+Down.

With four independent sibling roots visibly selected, a fresh tag is applied only to the two roots that were selected when the toolbar first appeared. The other two stay untagged. Waiting before opening the picker and waiting after Return do not fix it. The partial assignment persists after reload.

Environment

  • Official logseq/logseq master 22263c36204c86949df6cb4bfa278be0aa215353
  • Native Electron development app, Logseq DB 2.0.1
  • Electron 42.3.0 / Chromium 148.0.7778.180
  • Debian GNU/Linux 13, x86_64
  • Disposable local DB graph, sync off, no production source changes
  • Observed October 1, 2026. Web and authenticated sync not tested

Minimal native UI reproduction

  1. Create a page with five independent root blocks, without children, tags, templates, or properties:
    • QA tag alpha
    • QA tag beta
    • QA tag gamma
    • QA tag delta
    • QA tag sentinel
  2. Save and reload.
  3. Click alpha's text to edit, then press Escape to select the whole block.
  4. Press Shift+Down once, selecting alpha and beta. Wait until the floating toolbar is visibly present above those two blue blocks.
  5. With that toolbar already present, press Shift+Down twice more, extending the blue selection through gamma and delta. Verify all four are blue and sentinel is not selected. Leave the toolbar open.
  6. Click the toolbar's # button. Wait for the Set Tags picker to be visible and focused.
  7. Enter a fresh tag name, such as QALateTag, verify the complete name, and press Return on New option: QALateTag.
  8. Do not immediately press Escape or click away. Observe the settled result with the picker still open.
  9. Dismiss the picker and reload. Inspect all five blocks.

Expected

Alpha, beta, gamma, and delta receive the tag, matching the current blue selection. Sentinel remains untagged.

Actual

Only alpha and beta receive QALateTag. Gamma and delta remain untagged although both were visibly selected before opening the picker and remained blue during the action. Sentinel is untouched.

This is already visible before dismissing the picker and persists after reload. There is no reported error.

Repeat and contrasting control

  • 2/2 controlled trials of the two-root → toolbar visible → four-root sequence on the same five-root fixture, using different fresh tags (QALateTag and QALateRepeat), produced only alpha/beta assignments. Both were observed before dismissal and persisted after reload.
  • The repeat tag's own page listed All 2, containing exactly alpha and beta. This was not just a missing inline tag label.
  • Control passed: after the first partial assignment, press Escape to close the picker while retaining the same four-root selection. Wait for the restored toolbar, reopen its # picker, and apply another fresh tag, QARefreshedTag. This tag applies to all four roots and persists after reload. The original partial tag remains only on alpha/beta.
  • An earlier setup observation on a separate five-root page tagged only three of four selected roots. It included quick dismissal, so it is not included in the controlled 2/2 count.

The controlled runs separate opening the picker, entering the name, committing with Return, and dismissing it. No fast-input race or interrupted write is required.

Related reports checked

Open/closed db-test and active toolbar/selection PR searches found no exact report for this trigger.

Source hypothesis

The selection action group reads selected IDs without a selection subscription, asynchronously stores block maps, and passes those maps as explicit :selected-blocks to the Tags dialog. show-action-bar! leaves an already-existing toolbar mounted. The property-dialog event prefers those supplied block maps over reading the live selection.

That is consistent with the earlier two-root selection being retained until the toolbar is restored. It is a read-only source hypothesis, not a runtime target trace or proof of which commit introduced the behavior.

Additional reproduction: shrinking selection tags now-unselected blocks

The reverse direction was also observed 1/1 on the same build and synthetic fixture:

  1. Select alpha through delta (four roots).
  2. Open the toolbar's # picker and press Escape without choosing a tag, retaining the four-root selection. Wait for the restored toolbar so its starting targets are all four.
  3. Press Shift+Up twice. Verify that only alpha and beta remain blue; gamma and delta are now outside the selection.
  4. Leave that toolbar open, click its # button, wait for picker focus, and enter a fresh tag QAOutsideTag.
  5. Press Return only and observe before dismissing the picker.

Expected: only alpha and beta receive the tag.

Actual: all four receive QAOutsideTag, including the visibly unselected gamma and delta. Sentinel remains untouched. This direction can therefore modify blocks outside the current selection, rather than merely omit newly selected blocks.

The assignment was observed at 23:35 UTC on October 1 and survived a reload at 00:10 UTC on October 2. A single Undo at 00:11 removed that latest tag assignment from all four while preserving the earlier tags and all five block titles. No new assignment was performed between the original observation and that reload/Undo check.

Activity

  1. 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.

  2. added 5 commits that reference this issue on Oct 28, 2026
    501dff7
    00f1a6b
    cdcceb3
    e09cd18
    4306d3f
  3. added 9 commits that reference this issue on Nov 11, 2026
    33aab8e
    c8ca251
    026e52d
    fdaaed7
    3bb85d0
    7096889
    80edfcd
    c07b79d
    a913ac3
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