-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Modal] RTL - Scrollbar and padding issue #23489
Comments
I understand that it's related to the v4 but I think the issue will still exist in v5. Any workaround is welcome! Thanks! |
Could you test it on v5? Also, did you look into a solution? RTL is 2% of the usage of the library, it's not a high priority for us. |
@oliviertassinari Hey, thanks for the quick reply, Issue is here https://github.com/mui-org/material-ui/blob/next/packages/material-ui/src/Modal/ModalManager.ts#L61. Padding can be determined based on dir attr of the body? I will try v5 but as I mentioned there is some issue with codesandbox template. |
I see, your scrollbar is in the opposite side (at the end). Is this the most common behavior? I guess I would need to change my whole OS language to see this. |
Looks like chrome flips the main scroll only when the OS language is different or something like that. But other scrolls are flipped properly. That what I see based on codesandbox if it's in the project view scroll bar is on the left because the preview is an iframe. But if you open the project in a new window scrollbar is on the right. |
The issue is about padding being added to the right side of the body instead left side for RTL.
Current Behavior 😯
When modal opens in RTL (direction="rtl") there is visible content shift. It's not happening for the LTR because
padding-right
compensates it.Expected Behavior 🤔
In RTL mode
padding-left
has to be set instead.Steps to Reproduce 🕹
https://codesandbox.io/s/material-demo-forked-uklog?file=/index.js
Had an issue with the official template. I don't think it's somehow related to the styling rather the problem is in ModalManager that sets padding on the body
Steps:
Context 🔦
I am building an accessible app that requires RTL support and discover this issue.
Your Environment 🌎
The text was updated successfully, but these errors were encountered: