ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Beta 11 / Ionic 2: NavController.pop or Back Button redirects to a black Page

Open chack opened this issue 10 years ago • 15 comments

Hey there,

if I'm really fast with the back button or using navController.pop() I'm getting following result:

image

I could fix it with a timeout of 100ms with navController.pop() but how can I fix the back Button? Im inserting the Page with navController.push so I don't get what I'm doing wrong...

UPDATE: The timeout of 100ms doesn't fix the issue...

chack avatar Aug 05 '16 21:08 chack

Hello! Thanks for opening an issue with us! Would you mind posting a repo that i can use to reproduce this issue? Thanks for using Ionic!

jgw96 avatar Aug 05 '16 22:08 jgw96

There you go:

https://github.com/chack/app

chack avatar Aug 05 '16 22:08 chack

I also encountered a similar issue in the beta-11, but beta-10 is still working normally

nhohb07 avatar Aug 09 '16 17:08 nhohb07

Hello @chack , while i greatly appreciate the repo is their any way that you could provide a minimal example using one of our starters instead (ionic start test-app --v2)? It is much easier and efficient to debug with a minimal example compared to a full app. Sorry, i should have been more clear about my request for a repo. Thanks!

jgw96 avatar Aug 09 '16 17:08 jgw96

@jgw96 Assuming this is the same issue as the 226 on the conf app, I have found I can recreate it specifically when mode set to ios in the bootstrap. (happens one time in ten).

alexbainbridge avatar Aug 09 '16 18:08 alexbainbridge

This happens with me too!

ezgif com-video-to-gif

rodneicouto avatar Aug 09 '16 20:08 rodneicouto

@rodneicouto Hello! Are you getting any errors in the console when this happens? Also could your provide a minimal repo that i can use to reproduce this issue? Thanks!

jgw96 avatar Aug 09 '16 20:08 jgw96

There is no error in the console.

I tried to reproduce in a smaller project or Plunker unsuccessfully.. Only happens with me in my big project.

The ion-content is receiving a strange opacity and transform style

<Ion-content class = "contact-list has-infinite-scroll" padding = "" style = "opacity: 0.8; transform: translateX (-33%);">

Sometimes work fine. Sometimes occurs another problem: the back button stopped working. It is intermittent.

If i shared my big project with you, help?

rodneicouto avatar Aug 09 '16 21:08 rodneicouto

With beta10 everythings working fine...

rodneicouto avatar Aug 09 '16 21:08 rodneicouto

I was pushing the page through a input via (onFocus)=nav.push(second page). So the keyboard got up for a second then closed in the new page where I programmatically focus another input so the keyboard showed up again. By using a button with (click)=nav.push(second page) I don't experience the bug with the black page. Maybe it has something to do with the keyboard? But on @rodneicouto case is now keyboard shown so I don't know

chack avatar Aug 10 '16 07:08 chack

Hi, we could reproduce the issue. It appers when you add LoadingController and an Ajax call.

You can download the code from here: https://github.com/ferminmoli/Ionic-popToRoot

ferminmoli avatar Aug 10 '16 12:08 ferminmoli

It looks like the LoadingController is overriding the app nav, and it's loosing the navigation stack.

nachofregeiro avatar Aug 10 '16 15:08 nachofregeiro

Hello everyone, after reviewing this issue some more it seems as if it is caused by https://github.com/driftyco/ionic/issues/7605. Because of this i am going to consider this issue a duplicate of that issue and therefore close this one. Thanks for using Ionic!

jgw96 avatar Aug 10 '16 16:08 jgw96

I don't think this issue is caused by #7605, I'm not even using LoadingController and I am getting the exact same black screen.

jasonwaters avatar Aug 12 '16 01:08 jasonwaters

I can confirm that using NavController.pop(), all pages get popped until it reaches a black screen. I tested it in ionic view on iOS. I do not use Toast or LoadingController.

I tested it in ionic 2.0.0-rc.3

Below is my package.json file.

{
  "name": "Testing",
  "author": "",
  "homepage": "",
  "private": true,
  "scripts": {
    "build": "ionic-app-scripts build",
    "watch": "ionic-app-scripts watch",
    "serve:before": "watch",
    "emulate:before": "build",
    "deploy:before": "build",
    "build:before": "build",
    "run:before": "build"
  },
  "dependencies": {
    "@angular/common": "2.1.1",
    "@angular/compiler": "2.1.1",
    "@angular/compiler-cli": "2.1.1",
    "@angular/core": "2.1.1",
    "@angular/forms": "2.1.1",
    "@angular/http": "2.1.1",
    "@angular/platform-browser": "2.1.1",
    "@angular/platform-browser-dynamic": "2.1.1",
    "@angular/platform-server": "2.1.1",
    "@ionic/storage": "1.1.6",
    "ionic-angular": "2.0.0-rc.3",
    "ionic-native": "2.2.3",
    "ionicons": "3.0.0",
    "lodash": "^4.17.2",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "0.6.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "0.0.45",
    "typescript": "2.0.6"
  },
  "description": "Testing",
  "cordovaPlugins": [
    "cordova-plugin-device",
    "cordova-plugin-console",
    "cordova-plugin-whitelist",
    "cordova-plugin-splashscreen",
    "cordova-plugin-statusbar",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": []
}

sereysethy avatar Dec 05 '16 15:12 sereysethy