-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
MdDialog not opening on iOS Safari #10530
Comments
Hi, I just tested the stackblitz code and it seems to be working on iOS. However, I cannot open dialogs when building the project I'm currently working on with prod I'm trying to debug it at the moment and post an update if I can find the solution. edit: formatting |
This one is very odd. I wasn't able to reproduce it on a couple of iOS 11 devices, but I did manage to get it on a few rare occasions when running an iOS 10 device through the simulator. What's weird is that I could only get it through the Stackblitz and our docs site, but not in the demo app that's running against master. Furthermore, it seems like the element is in the DOM and it gets the proper styles (in this case |
@crisbeto I have iphone5 that ios latest version is v10.3.3. so I was reproduce aways. and I found one more thing. See the this video clip |
That's what I was getting as well. The interesting thing is that if you switch to another tab and then switch back, the dialog will show up. |
@crisbeto I wasn't able to reproduce When I was added an style attribute Refer to the message above. |
How did you add it @insanehong? Was it through the dev tools after the dialog is opened, or through a stylesheet? If it's the former, you saw the dialog, because you triggered a style recalculation manually which caused the dialog to be repainted. Otherwise setting the container to |
Same for me with iPhone 7 iOS 11.3 |
I found the solution, uncomment what you need in the file "polyfill.ts", I had completely forget that this file existed |
I have the same issue on iOS 10.2.1 and 10.3.3 (but cannot reproduce it on iOS 11). Dialog shows up when I trigger style recalculation in dev tools or switch to another tab and switch back. @yacineblr It seems that you have problem with closing dialog, not with opening. Polyfills haven't solve this for me. |
Same problem. I can open dialog window but can't close it. This bug appears on IPhone 7 with IOS 11.3. On 10.1.1 works fine. |
This is really odd, but all my safari problems are gone after
What's even more puzzling is that all the animations actually work on Chrome an ios too.. |
I solved this by adding |
@swftvsn I also fixed it with this way but some animations are broken on Safari desktop. |
@raimonfuns pointer-events solution did not work for me. @swftvsn turning off animations works also makes it so progress spinner does not spin any more among other issues. |
Has anyone been able to sort this? I'm still having this issue and haven't found a way to get around it (apart from creating my own modal service using Angular Portals). |
So, I've spent the better part of my working day (5 hours!!) trying to fix (what I thought) was an issue with Angular Material. Fortunately, I don't think there's an issue with Material, but I do think that there is an issue with the older versions of webkit that are used on iOS 11 and downwards. Like @crisbeto said, the modal gets added to the DOM and everything seems to be correct up until the point where it comes to displaying it. As we all know, this is not Angular's job but the rendering engine. To fix this, I simply force a re-render of the cdk-overlay-container by changing the CSS text after the modal opens and then changing it back to the original again. const dialogRef = this.dialog.open(MyComponent);
dialogRef.afterOpen().subscribe(() => {
const elements: any = document.getElementsByClassName('cdk-overlay-container');
elements[0].style.cssText += ';-webkit-transform: rotateZ(0deg) !important';
elements[0].style.cssText += ';-webkit-transform: none !important';
}); I haven't seen any issues because of this yet. cc interested parties: @rkajbaf @mezhik91 @raimonfuns @marcinbialkowski @insanehong |
@elsyms I tried your solution on a virtual device running iOS 10.3.2 and 10.3.3 but it didn't work. I unfortunately don't have access to a real device to confirm this is working. EDIT: After much nashing of teeth, this turned out to be caused by something unrelated I did to the CSS. Lesson learned, limit my css hacks! |
I figured out, that |
Closing since I can't reproduce it anymore and the description is pointing to a very old iOS version. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
Bug
What is the expected behavior?
The dialog should Open
What is the current behavior?
The dialog doesn't open and stop progress when reopen dialog
https://material.angular.io/components/dialog/examples had same problem now.
CodePen and steps to reproduce the issue:
CodePen Demo which shows your issue:
https://stackblitz.com/angular/pxglmmxpyejr?file=app%2Fdialog-overview-example.ts
Detailed Reproduction Steps:
on Safari or Chrome with iOS
Step1. click Pick one button
Step2 . close dialog
Step3. click Pick one button
What is the use-case or motivation for changing an existing behavior?
Which versions of AngularJS, Material, OS, and browsers are affected?
Is there anything else we should know? Stack Traces, Screenshots, etc.
The text was updated successfully, but these errors were encountered: