Skip to content

Commit

Permalink
fix(tabs): fix tabs rootNav
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Jun 21, 2016
1 parent ed6d0fa commit ae40edf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/components/tabs/tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ export class Tabs extends Ion {
*/
get rootNav(): NavController {
let nav = this.parent;
while (nav.parent) {
while (nav && nav.parent) {
nav = nav.parent;
}
return nav;
Expand Down
20 changes: 10 additions & 10 deletions src/util/ui-event-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class PointerEvents {
private pointerUp: any,
private zone: boolean,
private option: any) {

this.rmTouchStart = listenEvent(ele, 'touchstart', zone, option, (ev: any) => this.handleTouchStart(ev));
this.rmMouseStart = listenEvent(ele, 'mousedown', zone, option, (ev: any) => this.handleMouseDown(ev));
}
Expand Down Expand Up @@ -92,19 +92,19 @@ export class PointerEvents {
destroy() {
this.rmTouchStart && this.rmTouchStart();
this.rmTouchStart = null;

this.rmMouseStart && this.rmMouseStart();
this.rmMouseStart = null;

this.stop();
this.stop();

this.pointerDown = null;
this.pointerMove = null;
this.pointerUp = null;

this.ele = null;
}
}

}


Expand All @@ -119,8 +119,8 @@ export class UIEventManager {
listenRef(ref: ElementRef, eventName: string, callback: any, option?: any): Function {
return this.listen(ref.nativeElement, eventName, callback, option);
}
pointerEventsRef(ref: ElementRef, pointerStart: any, pointerMove: any, pointerEnd: any, option?: any): Function {

pointerEventsRef(ref: ElementRef, pointerStart: any, pointerMove: any, pointerEnd: any, option?: any): PointerEvents {
return this.pointerEvents(ref.nativeElement, pointerStart, pointerMove, pointerEnd, option);
}

Expand All @@ -135,7 +135,7 @@ export class UIEventManager {
pointerUp,
this.zoneWrapped,
option);

let removeFunc = () => submanager.destroy();
this.events.push(removeFunc);
return submanager;
Expand All @@ -155,7 +155,7 @@ export class UIEventManager {
event();
}
this.events.length = 0;
}
}
}

function listenEvent(ele: any, eventName: string, zoneWrapped: boolean, option: any, callback: any): Function {
Expand Down

0 comments on commit ae40edf

Please sign in to comment.