Skip to content

Commit

Permalink
fix(nav): push-pop pages too quickly
Browse files Browse the repository at this point in the history
fixes #8319
  • Loading branch information
manucorporat committed Sep 30, 2016
1 parent 50afa15 commit 9b65022
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/navigation/nav-controller-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ export class NavControllerBase extends Ion implements NavController {
const duration = trns.getDuration();

// set that this nav is actively transitioning
this.setTransitioning(true, duration);
this.setTransitioning(true, duration + ACTIVE_TRANSITION_OFFSET);

if (!trns.parent) {
// this is the top most, or only active transition, so disable the app
Expand Down Expand Up @@ -959,3 +959,4 @@ let ctrlIds = -1;

const DISABLE_APP_MINIMUM_DURATION = 64;
const ACTIVE_TRANSITION_MAX_TIME = 5000;
const ACTIVE_TRANSITION_OFFSET = 200;
9 changes: 5 additions & 4 deletions src/navigation/view-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class ViewController {
private _cntRef: ElementRef;
private _hdrDir: Header;
private _ftrDir: Footer;
private _hidden: string;
private _isHidden: boolean = false;
private _leavingOpts: NavOptions;
private _nb: Navbar;
private _onDidDismiss: Function;
Expand Down Expand Up @@ -273,10 +273,11 @@ export class ViewController {
// doing checks to make sure we only update the DOM when actually needed
if (this._cmp) {
// if it should render, then the hidden attribute should not be on the element
if (shouldShow && this._hidden === '' || !shouldShow && this._hidden !== '') {
this._hidden = (shouldShow ? null : '');
if (shouldShow === this._isHidden) {
this._isHidden = !shouldShow;
let value = (shouldShow ? null : '');
// ******** DOM WRITE ****************
renderer.setElementAttribute(this.pageRef().nativeElement, 'hidden', this._hidden);
renderer.setElementAttribute(this.pageRef().nativeElement, 'hidden', value);
}
}
}
Expand Down

0 comments on commit 9b65022

Please sign in to comment.