Skip to content

Commit

Permalink
fix(tabs): fix preloadTabs null element reference
Browse files Browse the repository at this point in the history
Closes #7109
  • Loading branch information
adamdbradley committed Jun 30, 2016
1 parent 55a5e83 commit 2d19308
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/content/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,8 @@ export class Content extends Ion {
this._tabbarPlacement = null;

let ele: HTMLElement = this._elementRef.nativeElement;
if (!ele) return;

let parentEle: HTMLElement = ele.parentElement;
let computedStyle: any;

Expand Down Expand Up @@ -511,6 +513,8 @@ export class Content extends Ion {
let newVal: number;
let scrollEle = this._scrollEle;

if (!scrollEle) return;

// only write when it has changed
if (this._fullscreen) {
// adjust the content with padding, allowing content to scroll under headers/footers
Expand Down

2 comments on commit 2d19308

@manucorporat
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamdbradley we don't have any e2e test with preloadTabs="true", I think we should have at least one to prevent this regression again :) do you want me to add it?

@tonyawad88
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi guys, after adding the above commit to beta10 the following decor div:
<div class="nav-decor"></div>
started showing up during transition. I'm using beta 10 + this commit.
Any chance of getting a brief summary of how that div is used ? I set its index to 0 for now.

black_bg_during_trans

Please sign in to comment.