Repository navigation
[drawer] Scroll instead of swiping when a drag starts on an SVG - #5844
Merged
Merged
Conversation
commit: |
Bundle size
PerformanceTotal duration: 519.61 ms +30.07 ms(+6.1%) | Renders: 76 (+0) | Paint: 955.65 ms +50.86 ms(+5.6%)
…and 1 more (+9 within noise) — details Metric alarms
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
atomiks
marked this pull request as ready for review
October 2, 2026 02:16
atomiks
requested review from
colmtuite,
flaviendelangle,
jjenzz and
michaldudak
as code owners
October 2, 2026 02:16
atomiks
force-pushed
the
claude/base-ui-issue-5843-a8c116
branch
from
October 2, 2026 02:26
7980bc0 to
dd405a2
Compare
atomiks
force-pushed
the
claude/base-ui-issue-5843-a8c116
branch
from
October 5, 2026 02:38
524558e to
6b89db0
Compare
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 #5843
The drawer's scroll checks walked up from the touched element only if it was an
HTMLElement. When a drag started on an SVG node (a chart, or an icon inside a button), the walk never started. The drawer then decided there was no scrollable content and swiped instead of scrolling. Mouse drags had the same problem throughhasScrollableAncestor: dragging on text inside scrollable content did not swipe, but dragging on an SVG there did.This PR makes the walk step over SVG and MathML elements and only check HTML elements for scrollability. The touch and pointer paths now share one ancestor walk, so they can't drift apart again. Toast swipes use the same walk and get the same fix.