Repository navigation
fix: finish a floating box's ride when Tab moves focus during it - #6437
Merged
Merged
Conversation
Since #6382, news rides into the panel's thread view drawn translated from where it stood. Chromium scrolls the control a Tab focuses into view by its drawn box, before `focusin` fires, so a Tab during the ride scrolled the view past the control's layout place. The thread card read that scroll as the user going to the answer and took New reply away before the next Tab reached it. A Tab keydown during a ride now finishes the motion, so the browser scrolls by layout. A pointer press keeps the ride, since it aims where things are drawn. Under 6x CPU throttle, test_the_thread_walk_stands_on_each_thread_it_opens failed 16 of 18 copies before this change and passes 18 of 18 after it. Closes #6425
This was referenced Nov 19, 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.
A Tab pressed while an arriving answer rides into the panel's thread view took New reply away before the next Tab could reach it. Since #6382 ("Carry what news moves in a growing thread view"), news rides in drawn translated from where it stood. Chromium scrolls the control a Tab focuses into view by where that control is drawn, and it does so before
focusinfires: logging showed the view'sscrollTopat 0 on the Tab keydown and already at 348 whenfocusinarrived. The thread card's#sawAnswerreads that scroll as the user going to the answer and removes New reply. #6382's author meant news to slide into place rather than jump, and that slide is kept.A Tab keydown during a ride now finishes the box's motion (
finishRideinbrowser/runtime/box-motion.js), as a user turning on reduced motion mid-tween already does. The browser then scrolls by layout, and in the failing case no scroll is needed. The issue suggested finishing on focus instead, but that runs after the browser's scroll, and I tried it: no change. Pointer presses keep the ride, since they aim where things are drawn and finishing would move the target out from under the pointer. The send's ride had the same exposure before #6382, and this covers it too.Verification, with
uv run leaf-dev suite flake --cpu-throttle 6ontest_render_floating_panel.py::test_the_thread_walk_stands_on_each_thread_it_opens:667b6c76b, no change4fbd34593Also passing on this branch: the thread news, held-news and streaming-answer tests in
test_render_floating_panel.py,tests/journeys/test_floating_box_motion.py,pnpm run test:runtime, the browser type check, and pre-commit on the file.Closes #6425 — automated triage