Open deporter opened 6 years ago
Hi, I have exactly the same issue... any updates?
@deporter Hi! I have checked that in your example, the issue is fixed. Can you please provide how did you solved? Thank you so much!
@chemitaxis Unfortunately I couldn't solve it using react-modal, so I used react-responsive-modal for this project, I prefer react-modal though, I just couldn't get around the issue and didn't have enough time to look into the code.
Hi @deporter after looking the code, if you use this props just on ios, the problem is solved:
shouldFocusAfterRender={false}
Have a nice day!
Try adding sandox attribute to your iframe.
Summary:
When opening a React Modal on iOS using Safari and Chrome within an Iframe, and the iframe is surrounded by other content above and below, the page jumps way below the iframe. This means the user loses context.
Expected behavior:
Page should stay in the same position on open of Modal
Example of issue:
https://www.foxsports.com.au/nrl/state-of-origin/teams/queensland/after-15-years-the-maroons-are-looking-for-a-new-no9-and-captain/news-story/bbb5c3094b60a4d216850209423656fd
On iOS device, got to above link, scroll down to "State of Origin Team Selector", click plus to add player. The page jumps on open of modal.
Additional notes:
I was able to narrow it down to the modal specifically, as if i remove everything but the modal opening it doesn't jump, even if the button is still changing the state.
I assume this is probably some iOS bug, but if anyone can help with this that would be great. Thanks