I’ve encountered an issue with s-modal when using RTL (Right-to-Left) languages such as Hebrew and Arabic. The component does not behave as expected in RTL layouts, which causes layout and usability problems.
Hey @shat_Eng, thanks for getting back in touch. I checked this against the current Polaris CDN build, and I’m no longer able to reproduce the RTL positioning issue on my end from what I can tell
In my test with Hebrew content, the s-modal seems to be centering correctly now in both mobile-sized and desktop-sized viewports. I’m attaching a quick video showing the repro setup and result.
Could you try a hard refresh / clear cache and confirm you’re loading the current https://cdn.shopify.com/shopifycloud/polaris.js bundle? If you’re still seeing it after that, a small repro of your code would help us check whether there’s a more specific layout case still causing it, hope this helps and please let me know if I can help out further!
Thanks @Alan_G for getting back to me and checking this.
We tested it further and noticed that the issue only occurs inside the Shopify ecosystem environment. When running the app locally, the modal positions correctly in RTL.
As highlighted in the screenshot (orange box), it looks like the CSS transform/position calculation is incorrect in the embedded Shopify context. The modal container still appears to be applying -50%, which is causing the positioning issue in RTL layouts.
Hope this helps narrow it down. Please let me know if you need any additional details or another repro from our side.
No worries @shat_Eng - thanks for confirming. I believe I was able to replicate this. I’ll do some further digging into this and reach out to some folks internally. I’ll be in touch as soon as I have more info to share
I dug into this again, and I don’t have an update to share, but I’ll loop back here once I have confirmation that the fix has shipped and I’ve retested it on my end. It does look like some work has been done internally, but I definitely get that this isn’t ideal when it’s affecting an RTL merchant-facing flow.
Hey @shat_Eng - I was able to touch base internally on this for you and I can confirm we’re still working on this. I’ll keep you in the loop here. There has been some work done, but still can’t say exactly when this will be deployed live, but I will update you as soon as I see that it is. Thanks again for your patience on this