Repository navigation
Press a trace scale choice after its menu has followed the scroll that shows it - #6063
Merged
Merged
Conversation
…t shows it Two trace comparison tests timed out on CI pressing "Actual size" (#5780, macOS nightly and Linux push runs). Playwright's call log showed the choice visible, enabled and stable, then `<body>` intercepting the press, then the choice not visible for 120 s: the press closed the Image scale menu. The menu hangs from its trigger by CSS anchor positioning. Below image tools near the window's foot it reaches into the root's foot padding (the floating panel's band, `followBox`), so Playwright's click scrolls the choice into view first, 407 px on this page. After a scroll, Chromium moves an anchor-positioned box only at the next rendering update (measured: the menu's box and hit test read the old place synchronously and in the next rAF callback, the new place one update later; the margin card does the same). The click reads the choice's old box and presses there. On a fast machine the press arrives before the update and hits the choice. On a slower one the update comes first, the press lands below the trace on the page, and the menu closes, as any press outside it does. Reproduced with the second test's steps under `--cpu-throttle 20`: 3 of 8 presses missed with CI's exact call log. With the choice scrolled into view and `rendered` before the press, 0 of 8 missed, and the three tests that press a scale choice pass under the same throttle. Pressing at the box read right after the scroll, one rendering update later, lands on `<body>` every time. `press_scale` does that for each pointer press of a scale choice in the module, and tests/AGENTS.md says when a click needs it. Behavior is unchanged: a reader's own press doesn't scroll first, so it lands where the menu is drawn.
leaf-agent
approved these changes
Nov 15, 2026
This was referenced Nov 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.
Three trace tests press "Actual size" in the Image scale menu, and two of them timed out on CI with
<body>intercepting the press (#5780 on macOS nightlies, and on Linux too). The menu hangs from its trigger by CSS anchor positioning, and near the window's foot its lower choices reach into the band the page keeps clear for the floating panel (scroll-padding-bottom), so Playwright's click first scrolls the choice into view (407 px on this page). Chromium moves an anchor-positioned box only at the next rendering update after a scroll, so the click can read the menu's old box and press the page there, which closes the menu.The tests now scroll the choice into view and wait for
renderedbefore pressing it (press_scale), andtests/AGENTS.md("Driving the browser") states the rule for any anchor-positioned target. A user's own click never scrolls first, so the product is unchanged.Under
--cpu-throttle 20, 3 of 8 presses missed before and 0 of 8 after; the three tests pass on this Mac.max-sixty asked for fixes to the macOS-only test failures; they haven't read this yet.
Refs #5780