I have a scrollable iframe set up on iOS like this:
<div style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; overflow: scroll; -webkit-overflow-scroll: touch; ...">
<iframe style="height: 600px, ...">
</iframe>
</div>
The height of the iframe is currently set to screen.availHeight
, and it remains the same even when the orientation changes.
If the modal is opened in portrait mode or landscape mode, everything works perfectly. However, if the modal is opened in portrait mode and then rotated into landscape mode, the scrolling functionality stops working correctly. Instead of scrolling within the modal, you end up scrolling the underlying page.
This issue occurs despite the fact that the styling for the iframe remains consistent regardless of orientation. Has anyone encountered this problem before? Are there any solutions or workarounds available? As someone new to this, I would appreciate any guidance or advice.