Repository navigation
Take a press on a row's digit as a press on its mark or Add field, as on a card - #7075
Merged
Merged
Conversation
… on a card When the user is in an option group by the keyboard, each option and the Add field wear a digit. On a card the digit stands over the option's mark, so a pointer press there is the mark's. In the row form the digit stands in a column of its own, before the mark, and takes no pointer, so a press there landed on the row or on the Add form: - In Chromium, with the row's words selected to the end of a line, the press picked nothing. Chromium keeps a selection through a press beside a line the selection reaches, so the option's click handler (`aimedAt`) read the click as the selection's. - In both engines a pick made there took focus to the body, and the group's digits went with it. - A press on the Add field's digit did nothing. While the digit shows, the mark reaches back over the digit's column (`::after`, the digit's height), and the Add field over the form's leading column (`::before`). The press lands on the mark, which picks the row whatever is selected and keeps the user on the mark, or on the field, which takes a press on its padding as a focus. The reaches paint nothing: the option and hint stills (25 states) and a screenshot of a row group with its digits shown are pixel-identical to main in Chromium and Firefox. They exist only while the digit shows, since each is a positioned box Chromium's hit test visits on every call, and at rest a drag from the leading column should still select the row's words. `test_a_press_on_a_rows_digit_is_a_press_on_its_control` holds all three in both engines; with the mark's reach removed it fails at the pick in Chromium and at focus in Firefox, and with the field's removed at the field's focus in both. Left as on main: in Chromium, with all of a row's words selected, a press on the row's blank end or leading column while no digit shows clears the selection and picks nothing, which is the shared guard's reading of a kept selection, not a digit's.
leaf-agent
approved these changes
Nov 24, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 24, 2026
…e selected words as a pick (#7091) Two presses on an option row did the wrong thing, both left over from #7075. **A press in a row's digit column, away from the digit.** On a row several lines tall, with the keyboard holding the user in the group, a press in the leading column above or below the digit picked the row but took focus to the page, and the group's digits disappeared, in both engines. The digit's reach covered only the digit's height. While the digit shows, the row's mark now stands the row's height, with its box still drawn at the centre, so the reach covers the whole column and the press keeps the user on the mark. Nothing is drawn differently: 12 option and hint stills show 0 changed pixels in Chromium and Firefox, and only the mark's computed height and margins differ in the two states that show a row's digits. **A click past a row's selected words.** In Chromium, with all of a row's words selected, a click on the row's blank end or its leading column picked nothing, and it took a second click to pick. Chromium keeps a selection through a press beside the lines it spans, and the click guard (`reachedForWords` in `widget-elements.js`, behind `aimedAt`) read that release as the end of the selection. The guard now records the selection as each press begins. A selection the press found and left unchanged counts only where the release stands over one of its characters. A press that made or moved the selection, as a drag or a double-click does, still counts as the selection's, and so does a press on the selected words. `aimedAt` gains no name or option. To do this the guard needs the character test that `anchor-paint.js` already had, so that test moved to `geometry.js` (`overCharacter`) and both files use it. To weigh: the guard decides for every control and container it serves, so a press beside an older selection now acts everywhere, as the module header already says it should. Max asked for this. Two tests in `tests/browser/test_render_options.py` cover the changes in both engines, and each fails once its change is reverted: - `test_a_press_in_a_rows_digit_column_is_a_press_on_its_control` (renamed from `test_a_press_on_a_rows_digit_is_a_press_on_its_control`) presses above the digit of a row three lines tall. - `test_a_click_beside_a_rows_selected_words_picks_it` clicks past a row's selected words. The option, hint, mark, gloss, anchor and preview tests that use the guard pass by node id (62). Pre-commit and `pnpm run check` pass. > _This was written by Claude Code on behalf of max-sixty_
This was referenced Nov 25, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 25, 2026
… reach over a ring as no cover (#7129) In an opened settled decision whose options are bare rows, with the keyboard in the group so its digits show, the focus ring on an option's mark stood the row's full height: a tall ring round the 11px circle, reaching 5px above and below the row, with its bottom run under the next row's ground. It hugs the mark again, as it did before #7091. **Cause.** #7091 made a row's mark stand the row's height while the digit shows, so that the mark's reach (the transparent `::after` #7075 added) covers the whole digit column. A ring follows the box it is drawn on, so the mark's own ring grew with it. In a live group the row wears the mark's ring and the mark's own is off, so nothing visible changed there, and #7091's stills showed only live groups. An opened settled group is the one place the mark wears its own ring, and no still covered it with the digits showing. **Fix.** The mark stands the row's height only in a live group. In a settled group it keeps its 11px box, and its reach covers the digit's height, as in #7075; one `inset-block: min(0px, (100% - var(--lf-key-badge-size)) / 2)` serves both. A new stills state, `settled-option-row-keyboard`, shows the surface. To weigh: in an opened settled group, a press in the digit column above or below the digit (6px each side on a one-line row) lands on the row again. It picks the row, but focus leaves the group and the digits disappear, which #7091 had fixed. Keeping both would need the ring off the mark's box, for example by having the row wear the ring in a settled group as it does in a live one. That changes how a settled group shows focus, so it is left for you to decide. **The ring check's other five faults.** `test_each_sampled_focus_ring_is_shown_whole_in_its_surface` also reported the left edge of a live row's ring in ship-review and feature-gallery as "under" the row's own mark. That ring is whole: the screenshot shows the ring's colour at each sampled point. The box over the left band is the mark's reach, which takes hits and paints nothing. The check counted a hit on a box inside the control as paint whenever the box's own styles showed a fill or border, and a hit on a pseudo-element is read through its host's styles. These covers now go through the screenshot confirmation that a neighbour's cover already goes through (#4836). The new `test_the_ring_reading_passes_over_a_reach_inside_the_control_that_paints_nothing` fails without that change. The defect surfaced as a failure of that ring test in #7119, the runtime's layer move, which doesn't cause it: the test fails the same way on `main` at 109461e and f9ff587. A pull request runs it only when it edits the test's file. max-sixty asked for refactoring to continue while each change improves the code. Checks: the ring test passes (it failed with 6 faults before); the new ring-reading test and two neighbours; 11 option tests by node id, including the digit-column press test in Chromium and Firefox; `leaf-dev stills --base` in Chromium and Firefox (the settled state changes, `ship-option-row-keyboard` is identical); the stills model tests; pre-commit; `pnpm run check:browser`. > _This was written by Claude Code on behalf of max-sixty_
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.
When the user is in an option group by the keyboard, each option and the Add field wear a digit. On a card the digit stands over the option's mark, so a pointer press on it is the mark's. In the row form the digit stands in a column of its own before the mark and takes no pointer, so on
maina press there lands on the row or the Add form. In Chromium, with the row's words selected, that press picks nothing; in both engines a pick made there sends focus to the body and the group's digits disappear; and a press on the Add field's digit does nothing.While the digit shows, the row's mark now reaches back over the digit (a
::afterthe digit's height) and the Add field over the form's leading column (a::before). The press lands on the mark, which picks the row whatever is selected and keeps the user in the group, or on the field, which focuses. The reaches paint nothing: 25 option and hint stills, and a capture of a row group with its digits shown, are pixel-identical tomainin Chromium and Firefox. They exist only while the digit shows, since each is a positioned box Chromium's hit test visits on every call.To weigh: the reach is the digit's height, so in a row that wraps to several lines a press in the column above or below the digit still lands on the row and drops focus, as a press on a row's words does on
main.Max asked for this; a fresh-context agent used it in both engines without seeing the diff.
test_a_press_on_a_rows_digit_is_a_press_on_its_controlholds all three cases in both engines and fails with either reach removed; the hint and option browser tests pass by node id, and pre-commit andpnpm run checkpass.