Skip to content

[Ionic 4] navigateBack goes back leaving previous page in front #17194

Closed

Description

@joanroig

Bug Report

Ionic version:

[x] 4.0.0-rc.2

Current behavior:

After navigating to a page with navigateForward, if I immediately go back using navigateBack (for example, in ionViewDidEnter or in the constructor) the child page will be invisible but in front of the previous screen, which blocks the UI interaction.

Expected behavior:

I expect to go back from the child page and interact with the parent page normally without an invisible blocking layout over the page.

Steps to reproduce:

Create a page that navigates to another one:

this.navCtrl.navigateForward('user-info');

Go back in the child view:

ionViewDidEnter(){
    this.navCtrl.navigateBack('/home');
}

Current workaround:

I'm using a timeout to wait before going back, this solves my problem for now:

new Promise(resolve => setTimeout(resolve, 300)).then(_ => {
    this.navCtrl.navigateBack('/home');
});

More information:

Here I show the home view after going back from the child view, I cannot interact with the buttons because I have the invisible layer mentioned before in front of the scrollview:
image

Ionic info:

Ionic:

   ionic (Ionic CLI) : 4.8.0

System:

   NodeJS : v10.8.0
   npm    : 6.6.0
   OS     : macOS Mojave

Activity

  1. added a commit that references this issue on Jan 22, 2019
    a945b03
  2. ionitron-bot commented on Feb 21, 2019

    @ionitron-bot

    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.

  3. locked and limited conversation to collaborators on Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions