Repository navigation
fix: contain source scrollbar spacers before widget upgrade - #4365
Merged
Merged
Conversation
Source pre blocks release their formatting context when the shared primitive resets overflow to visible. The scrollbar-clearance float can then escape a clipped diff and push the first line of the next paragraph down. Keep the source in its own flow root, preserving the clearance without letting it affect later blocks. Preserves #4323 removing the filter from one-file diffs. Both reported startup cases fail before the change and pass afterward, along with the other first-box cases and source/scroller checks. Closes #4349
# Conflicts: # browser/shadow.css
This was referenced Oct 28, 2026
This was referenced Oct 29, 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 source
<pre>lost its formatting context when the shared source style setoverflow: visible, letting its floated scrollbar-clearance spacer escape into later blocks. After #4323 shortened one-file diffs by removing their filter bar, that float pushed the following draft's first line down by 10px in the phone case and 6px after a panel; the draft then shrank at upgrade even though the diff itself kept its box.The shared source primitive now uses
display: flow-rootto contain the spacer while preserving its clearance. This keeps #4323's intent and the existing first-paint stability guarantee. On screen, the following draft starts at its presented height; the diff's box and its settled controls stay the same.Both reported cases fail before the fix and pass after it. All five first-box cases and focused source-widget and text-scroller checks pass, as does
pnpm run check. Startup screenshots of both reported cases show the corrected first-line position;leaf-dev stillsfinds the settleddiff-long-linesandrelease-draft-hoverstates unchanged. The repair adds no runtime work or requests.Closes #4349 — automated triage