Repository navigation
Let trackpad scrolls over an inline preview leave the bottom of a thread - #6832
Merged
Merged
Conversation
…d frame An iframe in the timeline (inline-vis, docs embeds, PDF previews) receives its own wheel events, so the timeline sees the chained scroll without any input. While attached to the bottom the scroll keeper treated that as a layout shift and snapped back, so small trackpad scrolls over the last preview could not leave the bottom. Follow unexplained scrolls while an iframe in the timeline is hovered. Fixes #6740 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymichael
force-pushed
the
bb/triage-and-resolve-issue-6740-thr_zpkuxfj9dy
branch
from
November 2, 2026 18:44
6711716 to
702d999
Compare
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.
Human comments
What was wrong
The timeline's scroll keeper tells the reader's scrolls apart from layout shifts by listening for
wheel, touch, pointer and key input on the timeline. An iframe in the timeline (inline-vis, docs embeds, PDF previews) receives its own wheel events, so when the browser chains a scroll from the frame to the timeline, the timeline scrolls with no input it can see. While attached to the bottom,handleScrolltreated that as an unexplained displacement and wrote the scroll back to the end, so small trackpad scrolls over the last preview could not leave the bottom. Investigation: https://get-bb.github.io/reports/issues/6740.htmlWhat changed
apps/app/src/components/ui/scroll-position-keeper.ts:followsUnexplainedScroll()also follows a scroll without visible input while an iframe in the timeline matches:hover, like it already does while the window find bar is open. Hover is read when the scroll arrives instead of being tracked from pointer events, so a frame that is removed or re-rendered under a resting pointer leaves no stale state. The rest of #6434's rule is unchanged: with no hovered frame, an attached view still snaps back.This takes the issue's "more general option" rather than its proposed postMessage wheel bridge in inline-vis, so it covers every embedded frame (inline-vis, docs embeds, PDF previews) and needs no cooperation from the frame. It does not cover touch scrolling over a frame, browser find on the web, or VoiceOver, which #6434 already listed as pulled back at the bottom.
How you verified
pnpm exec turbo run test --filter=@bb/app -- src/components/ui/scroll-position-keeper.test.ts src/components/ui/scroll-position-keeper.model.test.ts).pnpm exec turbo run typecheck lint --filter=@bb/app: no errors.pnpm start:worktree, Claude Code thread whose last message is a 1600px inline-vis), headless Chrome, 30 wheel steps ofdeltaY: -8with the pointer over the iframe from the bottom: before 1514 → 1514 (stuck), after 1514 → 1274.frameDocument): before 1800 → 1800, after 1800 → 1560, matching scrolling over host text.Not verified: touch scrolling over an iframe on iOS/Android, which may have the same gap since touch events inside the frame also never reach the timeline.
Fixes #6740
🤖 Generated with Claude Code