fix(react-drawer): tolerate fractional scroll metrics when detecting scroll bottom#36333
Open
Aidam1 wants to merge 6 commits into
Open
fix(react-drawer): tolerate fractional scroll metrics when detecting scroll bottom#36333Aidam1 wants to merge 6 commits into
Aidam1 wants to merge 6 commits into
Conversation
Author
|
@microsoft-github-policy-service agree |
Aidam1
marked this pull request as ready for review
June 23, 2026 08:50
PaulGMardling
approved these changes
Jul 8, 2026
Contributor
There was a problem hiding this comment.
You’ve done a great job tracking down the root cause here and landing on a more robust fix for the bottom scroll detection.
I had a couple of small non-blocking suggestions to tighten up the final shape a bit, mostly around readability and making the intent a little clearer for future readers.
I added some unit test coverage on to help lock in the regression scenario, but overall this looks good to me.
dmytrokirpa
reviewed
Jul 8, 2026
…edback Co-authored-by: PaulGMardling <paulmardling@microsoft.com>
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.
Previous Behavior
DrawerBodydetermines its scroll position (top/middle/bottom) ingetScrollStateusing an exact equality check:At browser zoom levels above 100% (and on displays with fractional scaling), scrollTop, clientHeight, and scrollHeight can resolve to sub-pixel values, so scrollTop + clientHeight never exactly equals scrollHeight. The body then stays in the middle state even when fully scrolled to the bottom, which causes the separator between DrawerBody/NavDrawerBody and the footer to still be visible unexpectedly when the user reaches the end of the content.
New Behavior
The bottom check now allows a 1px tolerance so fractional scroll metrics still resolve to bottom. The separator now stays hidden when scrolled to the bottom, including at zoom levels of 110% and higher.
Related Issue(s)