ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.83k stars 13.51k forks source link

bug: Safe are not aplying on IOS "PWA" #29621

Open Diogo-Coding opened 2 months ago

Diogo-Coding commented 2 months ago

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

I use Ionic Vue 7.0.0: "@ionic/vue": "^7.0.0"

Browser with this problem: IOS Safari 17.5

I've tried the solution provided by another issue about this that the solution was change the meta tag of index.html

`

`

Issue i saw: env(safe-area-inset-*) not working #6688

I have a problem that happened without any update or change on my web app, after just revisiting my web app on pwa access in IOS.

038b63b0-222d-4ed5-8942-7d73293de801 fabbc8da-1811-46e7-b60d-6b68144a7a46

As you can see the page doesnt get the padding to the safe area needed and goes over the status bar.

On other hand, if i have an ion-header, ion-footer, etc.. then applies the safe area, otherwise if only theres an ion-content it doesnt get the needed padding for status bar and nav bar

Also modals, even with ion-header/ion-footer it goes over status/nav bar

This is my webmanifest: "display": "standalone", "display_override": ["window-controls-overlay", "standalone"],

An example of page (Last pic) code:

`

// rest of html

`

First pic is a modal with ion-header and ion-content inside ion-modal

I dont modifie or use any var like --offset-top/bottom, --ion-safearea-top/bottom or modify the --padding-top of ion-content in any of my css files or any views

Expected Behavior

Expected that ionic applied safe area properly

Steps to Reproduce

Any PWA App on Safari IOS and a view with only ion-content or open a modal

Code Reproduction URL

Code reproduction

Ionic Info

Ionic:

Ionic CLI : 7.1.5 (/home/sistemas/.nvm/versions/node/v20.9.0/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/vue 7.5.4

Capacitor:

Capacitor CLI : 5.5.1 @capacitor/android : 5.5.1 @capacitor/core : 5.5.1 @capacitor/ios : not installed

Utility:

cordova-res : not installed globally native-run (update available: 2.0.1) : 1.7.4

System:

NodeJS : v20.9.0 (/home/sistemas/.nvm/versions/node/v20.9.0/bin/node) npm : 10.1.0 OS : Linux 5.15

───────────────────────────────────────────────

 Ionic CLI update available: 7.1.5 → 7.2.0
     Run npm i -g @ionic/cli to update

───────────────────────────────────────────────

Additional Information

No response

ionitron-bot[bot] commented 2 months ago

Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.

If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.

For a guide on how to create a good reproduction, see our Contributing Guide.

Diogo-Coding commented 2 months ago

Heres the code reproduction: https://github.com/Diogo-Coding/bug-safe-area