Skip to content

Commit

Permalink
fix(content): adjust footer bottom based on the tabbar without padding
Browse files Browse the repository at this point in the history
  • Loading branch information
brandyscarney committed Jun 27, 2016
1 parent 90d0d33 commit 4567de2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/content/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,14 +530,14 @@ export class Content extends Ion {
newVal = this._footerHeight + this._paddingBottom;
if (this._tabbarPlacement === 'bottom') {
newVal += this._tabbarHeight;

if (newVal > 0 && this._footerEle) {
this._footerEle.style.bottom = (newVal - this._footerHeight - this._paddingBottom) + 'px';
}
}
if (newVal !== this.adjustedBottom) {
scrollEle.style.paddingBottom = (newVal > 0 ? newVal + 'px' : '');
this.adjustedBottom = newVal;

if (newVal > 0 && this._footerEle) {
this._footerEle.style.bottom = (newVal - this._footerHeight) + 'px';
}
}

} else {
Expand Down
3 changes: 3 additions & 0 deletions src/components/content/test/basic/page2.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<ion-toolbar class="opaque">
<ion-title>Footer</ion-title>
</ion-toolbar>
<ion-toolbar class="opaque">
<ion-title>Footer 2</ion-title>
</ion-toolbar>
</ion-footer>

<style>
Expand Down
3 changes: 3 additions & 0 deletions src/components/content/test/fullscreen/page2.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<ion-toolbar class="opaque">
<ion-title>Footer</ion-title>
</ion-toolbar>
<ion-toolbar class="opaque">
<ion-title>Footer 2</ion-title>
</ion-toolbar>
</ion-footer>

<style>
Expand Down

0 comments on commit 4567de2

Please sign in to comment.