question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ionic v4 - angular] - iPhone X don't show header and tabs correctly (missing safe area)

See original GitHub issue

Bug Report

Ionic Info

Ionic:

   ionic (Ionic CLI)          : 4.0.1 (/Users/u007240/.npm-packages/lib/node_modules/ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.0
   @angular-devkit/core       : 0.7.0-rc.3
   @angular-devkit/schematics : 0.7.0-rc.3
   @angular/cli               : 6.0.8
   @ionic/ng-toolkit          : 1.0.0
   @ionic/schematics-angular  : 1.0.1

System:

   NodeJS : v10.7.0 (/usr/local/Cellar/node/10.7.0/bin/node)
   npm    : 6.2.0
   OS     : macOS High Sierra

Describe the Bug Every starter came without padding for the safe area in iPhone X for the Notch.

Steps to Reproduce Steps to reproduce the behavior:

  1. ionic start myApp [tabs|menu|blank] --type=angular captura de ecra 2018-07-30 as 16 16 26

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
SoulOnFirecommented, Jul 31, 2018

@mswilson4040 this could be in fact something not related with ionic but in fact if we do any of the start templates in ionic 3 removing "–type=angular " ionic start myApp [tabs|menu|blank] all works as expected. Some of the apps in the market are incompatible with iPhone X because are created before ionic have iOS 11 support.

In order to resolve this issue I add the following css to the global.scss

body {
    background-color: var(--ion-color-primary);
}
ion-app {
    margin-top: env(safe-area-inset-top);
    margin-bottom: env(safe-area-inset-bottom)
}
1reaction
gabrielmaldicommented, Aug 17, 2018

This is now fixed in beta.3.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ionic angular Safe-area css ios issue - Stack Overflow
As you can see, my ion-header is under/overlay by the statusbar and the notch. I have tried --ion-safe-area-top but it seems equal to...
Read more >
How to Handle Safe Area Insets for iPhone X, iPad X, Android P
This guide shows how to use safe area insets to handle it in your iOS ... Similar to the iPhone X, Apple's new...
Read more >
ion-header - Ionic Framework
When a toolbar is used inside of a header, the content will be adjusted so it is sized correctly, and the header will...
Read more >
Ionic Cordova - wkwebview engine - Apple Developer
I have an ionic view and a footer with a button in it. When I add an ionic item to my ionic list,...
Read more >
Building the YouTube UI with Ionic - Devdactic
Additionally we need to create a directive that scrolls our header out or in while also moving the content, so we got quite...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found