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
bug: Modal with option animated: false does not display on iOS #19285
Comments
Thanks for the issue. Can you give the following dev build a try and let me know if it resolves your issue? If using Ionic Angular: Thanks! |
@liamdebeasi Thanks! That fixes it 👍 |
Thanks for the issue. This issue has been fixed via #19287 and will be available in the next release of Ionic. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Bug Report
Ionic version:
[x] 4.x
Current behavior:
On the latest version of Ionic v4.9.0, create a modal with the config option
animated: false
. The modal will not display on iOS Safari / WKWebview / Capacitor, but will in other browsers.Expected behavior:
I would expect the modal to display without any animation.
Steps to reproduce:
On master open the ion-modal basic test and add
animated: false
to thecreateModal
function. Open the test URL http://localhost:3333/src/components/modal/test/basic in Safari on IOS (a simulator works - iOS 12.2 or 13). Click "Present Modal". The modal will be inserted into the DOM, but won't display :(From initial investigation...
The
.modal-wrapper
on iOS seems to have atranslate3d(0,100%,0)
transform on it to prevent flickering https://github.com/ionic-team/ionic/blob/e27962dcaf98bfb1f4c026df5a8c525ee3773261/core/src/components/modal/modal.ios.scss#L15When you disable the animation with 0ms https://github.com/ionic-team/ionic/blob/e27962dcaf98bfb1f4c026df5a8c525ee3773261/core/src/utils/overlays.ts#L209 on iOS Safari it takes the translate3d into account, causing the modal to be hidden off screen.
Related code:
The text was updated successfully, but these errors were encountered: