Ionic-framework: Ionic 3 breaks back button

Created on 17 May 2017  路  5Comments  路  Source: ionic-team/ionic-framework

Ionic version: (check one with "x")
[ ] 1.x
[ ] 2.x
[x] 3.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

This bug appears on both browser and android using "back" button.

If you push a lazy-loaded page with custom data like this:

this.navCtrl.push('ListPage', { title: 'abc', id: 123 });

Using back button to navigate back to this page causes a re-create without custom data, thus breaking this page.

Most helpful comment

With more testing, I found using back button also breaks the navigation stack. On Ionic 2, using back button basically just pops one page, same as clicking the "arrow" on the title bar.

On Ionic 3 this is not the case anymore. Back button produces weird navigation behaviors. This is especially an issue on Android since back button is often used.

Maybe a temporary solution would be having an option to use lazy loading without changing URLs back and forth?

All 5 comments

Thanks, we will look into this.

With more testing, I found using back button also breaks the navigation stack. On Ionic 2, using back button basically just pops one page, same as clicking the "arrow" on the title bar.

On Ionic 3 this is not the case anymore. Back button produces weird navigation behaviors. This is especially an issue on Android since back button is often used.

Maybe a temporary solution would be having an option to use lazy loading without changing URLs back and forth?

I tested it again on Android. Navigation and "back" button don't change the URLs anymore, thus not breaking the pages. Interesting. I don't remember changing anything. But on browser the issue persists.

Hello! After further review, I am going to close this issue as a duplicate of https://github.com/ionic-team/ionic/issues/11469

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alan-agius4 picture alan-agius4  路  3Comments

BilelKrichen picture BilelKrichen  路  3Comments

MrBokeh picture MrBokeh  路  3Comments

fdnhkj picture fdnhkj  路  3Comments

danbucholtz picture danbucholtz  路  3Comments