Skip to content

Commit 4567de2

Browse files
committed
fix(content): adjust footer bottom based on the tabbar without padding
1 parent 90d0d33 commit 4567de2

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

src/components/content/content.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,14 +530,14 @@ export class Content extends Ion {
530530
newVal = this._footerHeight + this._paddingBottom;
531531
if (this._tabbarPlacement === 'bottom') {
532532
newVal += this._tabbarHeight;
533+
534+
if (newVal > 0 && this._footerEle) {
535+
this._footerEle.style.bottom = (newVal - this._footerHeight - this._paddingBottom) + 'px';
536+
}
533537
}
534538
if (newVal !== this.adjustedBottom) {
535539
scrollEle.style.paddingBottom = (newVal > 0 ? newVal + 'px' : '');
536540
this.adjustedBottom = newVal;
537-
538-
if (newVal > 0 && this._footerEle) {
539-
this._footerEle.style.bottom = (newVal - this._footerHeight) + 'px';
540-
}
541541
}
542542

543543
} else {

src/components/content/test/basic/page2.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
<ion-toolbar class="opaque">
2929
<ion-title>Footer</ion-title>
3030
</ion-toolbar>
31+
<ion-toolbar class="opaque">
32+
<ion-title>Footer 2</ion-title>
33+
</ion-toolbar>
3134
</ion-footer>
3235

3336
<style>

src/components/content/test/fullscreen/page2.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
<ion-toolbar class="opaque">
2929
<ion-title>Footer</ion-title>
3030
</ion-toolbar>
31+
<ion-toolbar class="opaque">
32+
<ion-title>Footer 2</ion-title>
33+
</ion-toolbar>
3134
</ion-footer>
3235

3336
<style>

0 commit comments

Comments
 (0)