Repository navigation
[composite] Fix scroll alignment for RTL direction in scrollIntoViewIfNeeded - #5234
Conversation
commit: |
Bundle size
PerformanceTotal duration: 1,423.85 ms +176.46 ms(+14.1%) | Renders: 78 (+0) | Paint: 2,204.42 ms +254.01 ms(+13.0%)
11 tests within noise — details Metric alarms
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for base-ui ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR fixes an RTL-specific scroll alignment bug in scrollIntoViewIfNeeded within the Composite internals, ensuring the overflow check uses the same scroll margin side as the subsequent scroll position calculation.
Changes:
- Align RTL “overflow to the left” detection to use
scrollMarginLeft, matching the computedtargetXadjustment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR fixes an issue in scrollIntoViewIfNeeded where the RTL overflow check used scrollMarginRight while the scroll position calculation used scrollMarginLeft