-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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: ionic 5 Modal with Google Maps #20572
Comments
Thanks for the issue. I am going to close this as this is not a bug in Ionic Framework. The default spec for iOS is to display a black background. Additionally, we do not manage the Google Maps plugin, so we are unable to control what styles it injects. From what it looks like, the Google Maps plugin is injecting global styles in many places which are interfering with the application. Based on the documentation, you should be able to customize what the background is being set to: https://github.com/ionic-team/ionic-native-google-maps/blob/master/documents/environment/setBackgroundColor/README.md |
@liamdebeasi Setting the Background Color works, but the background-color: black !important that sets to body while the modal is open still overrides that the map is visible. Is it possible to turn it back to use without !important to support a override? |
From the previous issue you opened, you confirmed that this behavior was expected which is why we changed it: #20469 (comment) What is the actual expected behavior in your use case? |
Yeah, that my fault, i'm sorry. I didn't know that the Google Maps Class has the Option to set the Background Color itself. In my last issue the space above the Modal was white, but this changes to black too if i use the Environment.setBackgroundColor('#000') method. So the Behavior i expect when using the Google Maps Plugin and open a Modal above it is that the Border around the Modal is black, but the Map itself should be visible. |
Ok try this dev build and let me know if it fixes the issue: |
Yes it works! The Google Maps Class override it and the Map is visible. In combination with Environment.setBackgroundColor('#000') the Space around the Modal is black! 🎉 Again: I'm really sorry that i didn't test this Part enough in the last Issue! |
No worries, glad it's working now 😄 |
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] 5.x
Current behavior:
When a Modal on ios over a Page with Google Maps is presented, the Map is black (because background-color: black is set on body). Thats why displaying the Map isn't working while the Modal is present.
Expected behavior:
The Map should be visible and the Background around the Map should be black (#20469).
A possible Solution is to remove the background-color on body and set instead
box-shadow: black 0px 0px 0px 100vh;
to the resized<ion-router-outlet>
. But for me it appears to be a little bit buggy then, so maybe to you know a better solution?Steps to reproduce:
Other information:
Ionic info:
The text was updated successfully, but these errors were encountered: