-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Cannot Scroll Parent Website When Modal Is Open Inside an iFrame #7576
Comments
I tried using your sample repro but not quite sure which of the subdirectories I'm suppose to be running to reproduce the issue, mind clarifying the steps to reproduce? From a high level, we could probably apply the preventScroll document styles to the iframe's document instead perhaps, not entirely sure what is expected in this scenario from an accessibility point of view though |
Thank you for your reply. Here is the issue to reproduce with my sample repo
|
Thanks for the repro steps, I see what you mean now I think, the user is unable to scroll the parent page if their touch starts within the iframe correct? We have some custom scroll prevention logic for mobile Safari which is most likely the cause of this behavior. Will have to dig for some alternatives because we do want to prevent scrolling inside the iframe when the modal is open (hence the above code) but I can see this being problematic if the iframe itself is taking the whole viewport but the user want to scroll the parent |
Yes, you are spot on. The issue occurs when the touch starts within the iframe while modal is open and it is preventing the user from scrolling the parent page. I understand the need for locking body scroll when modal is open but as you see it is preventing the parent scroll too. Thank you for your cooperation. |
Provide a general summary of the issue here
I have a website that uses the react-aria modal component. This website is embedded within an iframe on a parent website. When I open the modal inside the iframe, the parent website becomes unscrollable. This issue occurs specifically on iOS Safari.
It seems that the scroll locking behavior of the react-aria modal affects the parent website, even though the modal is confined to the iframe.
🤔 Expected Behavior?
The parent website should remain scrollable, and the scroll locking behavior should only apply within the iframe containing the modal.
😯 Current Behavior
The parent website becomes unscrollable when the modal inside the iframe is opened.
💁 Possible Solution
It seems that the scroll locking behavior of the react-aria modal.
🔦 Context
You can try in this demo repository. Parent means parent website which uses iframe and react-aria is for website that is embedded in the iframe.
https://github.com/htutwaiphyoe/iframe-resizer
🖥️ Steps to Reproduce
Version
^1.5.0
What browsers are you seeing the problem on?
Safari
If other, please specify.
iPhone
What operating system are you using?
iOS
🧢 Your Company/Team
Social+
🕷 Tracking Issue
https://github.com/htutwaiphyoe/iframe-resizer
The text was updated successfully, but these errors were encountered: