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.

ion-back-button and ion-menu-toggle not visible on iOS

See original GitHub issue

Bug Report

Ionic Info

Ionic:

   ionic (Ionic CLI) : 4.1.2

System:

   NodeJS : v8.11.4
   npm    : 6.4.1
   OS     : macOS High Sierra

Packaged Versions

{
  "@ionic/core": "4.0.0-beta.8",
  "@stencil/core": "0.12.4"
}

Describe the Bug

The ion-back-button doesn’t show the icon on iOS.

Steps to Reproduce

  1. Create and run an Ionic PWA Stencil project:
npx create-stencil ionic-pwa
npm i -D -E @capacitor/cli @capacitor/core
npx cap init <name> <app-id>
npx cap add ios
npx cap add android

npm start
  1. Change the emulated device in Chrome dev tools to an iOS device and reload.
  2. Switch to the profile route.
  3. The button exists (can be clicked and inspected) but the icon is invisible.

Related Code

<ion-header>
  <ion-toolbar color="primary">
    <ion-buttons slot="start">
      <ion-back-button defaultHref="/" />
    </ion-buttons>
    <ion-title>Profile: {this.name}</ion-title>
  </ion-toolbar>
</ion-header>

Expected Behavior

The icon should be visible.

Additional Context

Adding mode="md" to the ion-back-button component kind of fixes it: on iOS it actually shows the proper iOS back icon (chevron), not the Android back icon (arrow). However as I understand setting mode to md should also change the icon to the Android icon? The only way of forcing it to use the Android Icon is to run setupConfig({ mode: 'md' }).

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
cthoscommented, Sep 20, 2018

Can confirm I’m seeing this issue as well.

I think this is related to there being a

.sc-ion-back-button-ios-h {
  color: var(--ion-color-base);
}

Somewhere, which is making the color match the background?

image

I tossed a

.sc-ion-back-button-ios-h {
  color: white;
}

in my global.scss and it seems to be back?

1reaction
paulstelzercommented, Oct 4, 2018

I have added a PR -> #15847

They have fixed the back-button few weeks ago, but not the menu-button. I just fixed the problem with the color, but they have to add a lot of more css variables like they did at the back-button. So I don’t know if they merge it or if they fix the whole menu-button soon

Read more comments on GitHub >

github_iconTop Results From Across the Web

ion-back-button and ion-menu-toggle not visible on iOS #15545
The ion-back-button doesn't show the icon on iOS. Steps to Reproduce. Create and run an Ionic PWA Stencil project: npx create-stencil ionic-pwa ...
Read more >
ion-back-button: Custom Menu Icon for Applications
The ion-back-button is a custom menu icon for Android, iOS, and Progressive Web Apps. Use Ionic Framework components to easily build applications.
Read more >
Ionic 5 menu doesn't show up - Stack Overflow
In order to keep the ion-back-button or ion-menu-button there even if the context is lost. Use auto-hide attribute in Ionic 4 onwards.
Read more >
[Solved]-Ionic 5 menu doesn't show up-angular.js
In order to keep the ion-back-button or ion-menu-button there even if the context is lost. Use auto-hide attribute in Ionic 4 onwards.
Read more >
Build a Cross Platform Mobile App with Ionic 4 and Angular
In this tutorial, we'll learn how to use Ionic 4 and Angular to build a cross platform hybrid mobile application from scratch.
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