Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tapping a tab button 4 or 5 times to go back results in a black screen #8713

Closed
aemr3 opened this issue Oct 14, 2016 · 12 comments
Closed

Tapping a tab button 4 or 5 times to go back results in a black screen #8713

aemr3 opened this issue Oct 14, 2016 · 12 comments
Assignees
Milestone

Comments

@aemr3
Copy link

aemr3 commented Oct 14, 2016

Short description of the problem:

In a child page tapping a tab button 4 or 5 times to go back results in a black screen. There is no error in the console log.

What behavior are you expecting?

There shouldn't be a black screen.

Steps to reproduce:

  1. Create a new project with tabs template
  2. Add a button in HomePage with a click handler to push AboutPage
  3. Run the project and click the button
  4. Tap 4 or 5 times Home button of tabs constantly
  jump() {
    this.navCtrl.push(AboutPage);
  }

  <button ion-button (click)="jump()">Test</button>

Which Ionic Version? 1.x or 2.x

2.x

Here are the screenshots

https://cdn.pbrd.co/images/f2kWjqHYH.png
https://cdn.pbrd.co/images/f2jCI2isf.png
https://cdn.pbrd.co/images/f2lydPESJ.png


Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.1
Ionic App Lib Version: 2.1.1
Ionic App Scripts Version: 0.0.33
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: Mac OS X Sierra
Node Version: v6.6.0
Xcode version: Xcode 7.3.1 Build version 7D1014

@tonyawad88
Copy link

Same issue with pop. Pop multiple times result in a black screen.

@manucorporat manucorporat self-assigned this Oct 15, 2016
@delian7
Copy link

delian7 commented Oct 15, 2016

I'm not sure if this is a bug or not: if I am at the TabsPage and I want to pop() once to go to the root page it also results in a blank screen. In beta 11 this behavior worked, so I'm thinking that this is a bug and not a deliberate design.

@aemr3
Copy link
Author

aemr3 commented Oct 15, 2016

Mine issue is a bug. People sometimes tap really fast and app shouldn't crash on that behaviour.

@aemr3
Copy link
Author

aemr3 commented Oct 15, 2016

@manucorporat I think this issue is related with navigation/nav-controller-base.ts line 401 or 403:

if (isPresent(ti.removeStart)) {
    opts.animation = (leavingView || enteringView).getTransitionName(opts.direction);
} else {
    opts.animation = (enteringView || leavingView).getTransitionName(opts.direction);
}

On production I get this error:
TypeError: null is not an object (evaluating '(e||t).getTransitionName')

And sometimes this happens with just 2 taps.

@manucorporat
Copy link
Contributor

ok, I can reproduce this bug. Working in a fix.

@manucorporat manucorporat added this to the 2.0.0-rc.2 milestone Oct 16, 2016
@manucorporat
Copy link
Contributor

The issue was caused by two queued pop().

@aemr3
Copy link
Author

aemr3 commented Oct 16, 2016

Thanks @manucorporat, your commit fixed my problem.

@tonyawad88
Copy link

@aemr3 Hi, if I want to get the latest commits, did you install the nightly or did you have to apply it manually? I really need this before rc2 comes out. Any help is greatly appreciated. I am basically looking on how to apply this fix so I can use it in my rc1. Thanks !

@aemr3
Copy link
Author

aemr3 commented Oct 22, 2016

@tonyawad88 I have applied it manually. Here is what I did;

Open src/navigation/nav-controller-base.ts and replace this line:
this._app.setEnabled(false, duration);
with:
this._app.setEnabled(false, duration + ACTIVE_TRANSITION_OFFSET);

@manucorporat
Copy link
Contributor

You can try:

npm install --save ionic-angular@nightly

I released a nightly version 2 days ago.

@tonyawad88
Copy link

tonyawad88 commented Oct 22, 2016

@manucorporat Hii, I tried updating to the nightly but it's still breaking for me.

Here's some info and a gif.

If I click twice on the same menu item I still get the black screen. The menu item is basically calling a ts function with some logic and then it calls this.nav.pop();

Am I doing something wrong? Is this "2.0.0-rc.1-201610191717" the latest?

Thanks !

_TS_

openPage(page) {
      if(page.name == "my-canteens"){
            this.nav.pop({'animate':false});
     }
     //....
}

_Menu_

<ion-menu id="m1" [content]="content" class="mainSideMenu">
    <!-- ... -->
    <ion-content>
        <ion-list class="sidemenu_list">
            <button ion-item menuClose *ngFor="let p of pages" (click)="openPage(p)">
              {{p.title}}
            </button>
        </ion-list>
    </ion-content>
</ion-menu>
--------------------------------

Your system information:

Cordova CLI: 6.3.1
Gulp version:  CLI version 3.9.1
Gulp local:  
Ionic Framework Version: 2.0.0-rc.1-201610191717
Ionic CLI Version: 2.1.1
Ionic App Lib Version: 2.1.1
Ionic App Scripts Version: 0.0.37
ios-deploy version: 1.8.6 
ios-sim version: 5.0.8 
OS: Mac OS X Sierra
Node Version: v6.7.0
Xcode version: Xcode 8.0 Build version 8A218a 


--------------------------------

blackbg-on-pop

@movrack
Copy link

movrack commented Oct 25, 2016

We have the same error. how can we apply this fix without installing rc2 not yet stabilized ?

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants