[drawer] Ignore the page scroller when starting a swipe - #5567
Merged
Conversation
flaviendelangle
requested review from
atomiks,
colmtuite,
jjenzz and
michaldudak
as code owners
August 25, 2026 10:44
commit: |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Bundle size
PerformanceTotal duration: 1,240.92 ms +119.69 ms(+10.7%) | Renders: 76 (+0) | Paint: 1,980.36 ms +148.31 ms(+8.1%)
12 tests within noise — details Metric alarms
Check out the code infra dashboard for more information about this PR. |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
atomiks
force-pushed
the
drawer-page-scroll-swipe
branch
from
August 26, 2026 06:41
94ad5ae to
0877f1b
Compare
atomiks
approved these changes
Aug 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.
Closes #5566
useSwipeDismisslooks for a scrollable element between the touch target anddocument.body, and refuses to start (or gates the start on the scroll edge) when it finds one. That search also testsbodyitself. With a reset such ashtml, body { height: 100%; overflow: auto },bodyis a real scroll container, so a non-modal drawer on a long page can be swiped down but not back up from a lower snap point.Drawer.Viewportalready treatsbodyanddocumentElementas "no scroll container" in its native touchmove handler, so this makes the hook do the same. The page scroller is filtered per axis, so a genuine inner scroller on the other axis still gates the gesture.The added Chromium test reproduces the reset and fails before the change.