- Notifications
You must be signed in to change notification settings - Fork 13.4k
Description
Describe the Bug
When using the "Card modal" component, we noticed that it doesn't render its content after switching the viewport orientation back and forth:
Screen.Recording.2023-10-12.at.16.19.23.mov
Unfortunately, using the "Layers" tool I didn't notice any irregularities:
However, the issue doesn't happen if you rotate the device with the opened modal:
Screen.Recording.2023-10-12.at.18.41.19.mov
Or you don't open the modal in the horizontal view:
Screen.Recording.2023-10-12.at.18.42.43.mov
Moreover, the issue doesn't happen at all when the presentingElement
is removed from the IonModal
, thus removing the "Card effect":
Screen.Recording.2023-10-12.at.18.57.17.mov
Expected Behavior
The modal is consistently opened and rendered both in the vertical and horizontal modes. Prior openings of the modal shouldn't impact its rendering in the following ones. In short: should work like in the docs and demos 👌🏻
Steps to Reproduce
This bug can be reproduced using the official "Card Modal" example:
- Open the example in Stackblitz
- Open the preview in a new tab
- Enable mobile view testing
- Choose an iPhone device
- Vertical Open -> Close
- Rotate the view
- Horizontal Open -> Close
- Rotate the view
- Vertical Open
Then you'll see that the modal's content isn't rendered.
The issue happens not only on the Web but on real iOS devices as well.
Operating System
Macbook Pro, M1 2021, MacOS Sonoma 14.0
Browser
Chrome
Version
117.0.5938.149