Repository navigation
Take the page's last block as the reader's place below a page's end - #7209
Merged
Merged
Conversation
Since #7188 a column or sidebar page can scroll until its last line reaches the window's top, so the reading line, a quarter of the way down the window, can fall in the room below everything the page draws. There readingAt hit only the page's own box, and the walk took the reader to be at the page's start: after a wheel past the first of two tabbed questions, m went back to it instead of on to the second, and a let-go landed on main. readingAt now reads the line at the foot of the last box its column draws when the line falls below it, so a reader past the end is at the end. test_an_obligation_walk_glides_within_a_view_and_opens_other_tabs_at_the_question failed on main for its non-nested case and passes again.
leaf-agent
reviewed
Nov 26, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The clamp to the last drawn box's foot changes the reading line for every readingAt caller, not just the page-end case this fixes. Details inline.
The clamp in readingAt applied to every column it was given: with focus scrolled above the window it pulled the line above the viewport, so the reading-line hold held nothing, and it followed DOM order, so a short last grid column or float could clamp the line off words being read. readingAt is back as it was. The page's own fallback, shownAtLine, which a walk's origin and a let-go read, now takes the page's last drawn block when the line meets only body or the Layout's box below that block's foot.
leaf-agent
approved these changes
Nov 26, 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.
Fixes a regression from #7188: once a page's end can rise to the window's top, the reading line (a quarter of the way down the window) can fall in the blank room below everything the page draws. There
readingAtmet onlymain, so a walk took the reader to be at the page's start and a let-go landed onmain. On a page whose tabs hold two questions, a wheel past the first andmwent back to the first rather than on to the second. The page's fallback for a screen with no text block (shownAtLine, which a walk's origin and a let-go read) now takes the page's last drawn block when the line meets onlybodyor the Layout's box below that block's foot, so a reader past the end counts as at the end.To weigh: the last block is found by descending the page's last children that draw a box, skipping Leaf's chrome and what the page hides (a tab not chosen). It runs only on that fallback, not per frame, and
readingAtitself is unchanged, so holds and other columns read as before.Found while testing a follow-up to #7188 in this session; the maintainer hasn't read it. Tests:
test_an_obligation_walk_glides_within_a_view_and_opens_other_tabs_at_the_questionfailed on main for its non-nested case and passes; 23 neighbouring let-go, hold, walk and page-tab browser tests and the runtime suite (1133) pass;check:browseris clean.