Repository navigation
Conversation
Focusing the editable wrapper, or the browser moving focus to it on its own when it becomes the editing host, scrolls the viewport to the top of the wrapper. Making a block multi-selection across a scrolled page snapped the viewport to the top of the document and back. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GQNdFF1FUU9JXfNGZev2na
ellatrix
force-pushed
the
fix/multi-select-scroll-jump
branch
from
July 23, 2026 05:17
6839b22 to
c3017d1
Compare
|
Size Change: +7 B (0%) Total Size: 7.75 MB 📦 View Changed
|
Member
Author
|
Superseded by #80651, which includes both the preventScroll fix and the scroll regression test. |
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.
What?
Selecting blocks across a scrolled page (e.g. shift+clicking a block far down while a block at the top is selected) no longer scrolls the viewport to the top of the document and back. See #72512.
Why?
When a selection becomes a block multi-selection, the block list wrapper becomes the editing host and receives focus, either from the explicit focus call or from the browser moving focus there on its own. Focusing the wrapper scrolls it into view, and since it spans the whole document, that means jumping to the top.
How?
The focus call passes
preventScroll: true. Focus still moves; only the scrolling is suppressed. There is no case where scrolling to the top of the wrapper is wanted: anything that legitimately scrolls (caret placement, block focus) does so through its own element.The new test records scroll events during the gesture, since asserting the position afterwards would miss the round trip. It is skipped on WebKit: transient single selections during the gesture separately trigger the selected block scroll-into-view behavior there, part of the selection races tracked in #80608.
Testing Instructions
Use of AI Tools
Written with Claude Code, reviewed and tested by me.