Repository navigation
fix(editor): a click while the page scrolls edits the block on desktop - #13635
Merged
Merged
Conversation
## Problem On desktop, a click on a block sometimes does not start editing it. Nothing happens; a second click works. It happens when the click comes within about 250 ms of the page scrolling: for example right after moving a block with Alt+Shift+Up/Down (the moved block is scrolled into view), or right after a wheel scroll. The click lands, but the block's pointerdown handler returns early. ## Cause `block-content-on-pointer-down` ignores every pointerdown while `:ui/scrolling?` is true (060a0dd, "fix(mobile): don't switch to editing mode when scrolling"). `listen-to-scroll!` sets the flag on a scroll event (debounced 100 ms) and clears it 150 ms after the last one. The check exists so that the touch that scrolls a page on mobile is not taken as a tap, but it applies on desktop too, where a pointerdown is always a click. ## Fix The check applies only on mobile (`util/mobile?`). Desktop clicks during a scroll edit the block as they do at any other time. ## Test `frontend.components.block.scroll-click-test` calls the real pointerdown handler with a left click: - desktop, page scrolling: edits (fails on master) - desktop, no scroll: edits - mobile, page scrolling: does not edit (the mobile behavior is kept)
tiensonqin
force-pushed
the
fix/click-after-scroll
branch
from
October 7, 2026 11:34
bedef4f to
75e4ee9
Compare
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 8, 2026
devin-ai-integration Bot
pushed a commit
that referenced
this pull request
Oct 8, 2026
#13635) ## Problem On desktop, a click on a block sometimes does not start editing it. Nothing happens; a second click works. It happens when the click comes within about 250 ms of the page scrolling: for example right after moving a block with Alt+Shift+Up/Down (the moved block is scrolled into view), or right after a wheel scroll. The click lands, but the block's pointerdown handler returns early. ## Cause `block-content-on-pointer-down` ignores every pointerdown while `:ui/scrolling?` is true (148a3dc, "fix(mobile): don't switch to editing mode when scrolling"). `listen-to-scroll!` sets the flag on a scroll event (debounced 100 ms) and clears it 150 ms after the last one. The check exists so that the touch that scrolls a page on mobile is not taken as a tap, but it applies on desktop too, where a pointerdown is always a click. ## Fix The check applies only on mobile (`util/mobile?`). Desktop clicks during a scroll edit the block as they do at any other time. ## Test `frontend.components.block.scroll-click-test` calls the real pointerdown handler with a left click: - desktop, page scrolling: edits (fails on master) - desktop, no scroll: edits - mobile, page scrolling: does not edit (the mobile behavior is kept)
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 11, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 11, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 11, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 13, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 13, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 16, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 16, 2026
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.
Problem
On desktop, a click on a block sometimes does not start editing it. Nothing happens; a second click works.
It happens when the click comes within about 250 ms of the page scrolling: for example right after moving a block with Alt+Shift+Up/Down (the moved block is scrolled into view), or right after a wheel scroll. The click lands, but the block's pointerdown handler returns early.
Cause
block-content-on-pointer-downignores every pointerdown while:ui/scrolling?is true (060a0dd, "fix(mobile): don't switch to editing mode when scrolling").listen-to-scroll!sets the flag on a scroll event (debounced 100 ms) and clears it 150 ms after the last one. The check exists so that the touch that scrolls a page on mobile is not taken as a tap, but it applies on desktop too, where a pointerdown is always a click.Fix
The check applies only on mobile (
util/mobile?). Desktop clicks during a scroll edit the block as they do at any other time.Test
frontend.components.block.scroll-click-testcalls the real pointerdown handler with a left click: