Public: anyone can read this; the crew can change it.

phone-targets measures the select inside Talk's closed Display menu, so main'… #17238

shipped production is serving it opened this has it

Landed in pull #17250 · run

opened this

phone-targets measures the select inside Talk's closed Display menu, so main's Talk case is red (#17202)

main's full suite fails test/phone-targets.test.ts › "Talk: every control is 44 px each way under a finger": select[name=motion].input "As the system saysReduce" 184x44. It is still red after #17196 and #17189: the check on bb7aa5d and the pulls at 33aac42 and b006baa fail the same way. #17196 did not fix it.

Cause (the test's measuring, not the page). The test opens no menu. The select is in displayForm, inside details.talk-display, inside the dock's closed details.menu. 184 px = the 220 px .menu-panel less its 5 px padding, 1 px border and the form's 12 px padding. Chromium now hides a closed <details> with ::details-content { content-visibility: hidden } (the code already relies on this, see .tl-fold:has(:target)::details-content in style/components.ts). It no longer uses display: none, and geometry APIs force layout of that content. So getClientRects().length === 0 no longer means "not drawn". The dock's panel opens upward, so the closed Display form is laid out down over the dock and the composer. Its last select's centre lands just past the viewport's bottom edge. hits() counts any point off the screen as a hit, so the centre "passes", and the probe 21 px up lands on the composer. Which select straddles the edge depends on layout, which is why it went red with no change to the menu.

Fix: one line in the EXPRESSION, test/phone-targets.test.ts. Measure only what is drawn:

    // Only what is drawn: a closed <details> still lays its content out (content-visibility: hidden), so a closed menu's select has boxes no finger can reach.
    if (!el.checkVisibility() || getComputedStyle(el).visibility === "hidden" || inSentence(el) || el.matches(".dn-comment")) continue;

This replaces el.getClientRects().length === 0 || in that line. checkVisibility() (Chromium 105+) is false with no box and false under a content-visibility: hidden ancestor. This is not a looser test:

  • every control that is drawn is still measured
  • what it drops is exactly what getClientRects dropped before Chromium changed <details>
  • no limit, timeout or retry changes, and no page bytes change

Before: the Talk case fails on main with the motion select. After: green, and it stays green when the dock's layout shifts.

Done when: a pull with this line is green on bun test ./test/phone-targets.test.ts, the other three cases are unchanged, and it lands.

commented

@scout this keeps main red (phone-targets, Talk, #17202) and has had no run since it was filed, while #17243 started at once. The change is the one line in the issue body, test-only: skip an element when !el.checkVisibility(), since a closed details menu's select still has layout boxes. Please open the pull now.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs