@@ -72,9 +72,10 @@ export class Content extends Ion {
72
72
private _inputPolling : boolean = false ;
73
73
private _scroll : ScrollView ;
74
74
private _scLsn : Function ;
75
- private _scrollEle : HTMLElement ;
76
75
private _sbPadding : boolean ;
77
76
private _fullscreen : boolean ;
77
+ private _scrollEle : HTMLElement ;
78
+ private _footerEle : HTMLElement ;
78
79
79
80
/**
80
81
* @private
@@ -128,7 +129,7 @@ export class Content extends Ion {
128
129
ngOnDestroy ( ) {
129
130
this . _scLsn && this . _scLsn ( ) ;
130
131
this . _scroll && this . _scroll . destroy ( ) ;
131
- this . _scrollEle = this . _scLsn = null ;
132
+ this . _scrollEle = this . _footerEle = this . _scLsn = null ;
132
133
}
133
134
134
135
/**
@@ -478,6 +479,7 @@ export class Content extends Ion {
478
479
479
480
} else if ( ele . tagName === 'ION-FOOTER' ) {
480
481
this . _footerHeight = ele . clientHeight ;
482
+ this . _footerEle = ele ;
481
483
}
482
484
}
483
485
@@ -506,6 +508,7 @@ export class Content extends Ion {
506
508
*/
507
509
writeDimensions ( ) {
508
510
let newVal : number ;
511
+ let scrollEle = this . _scrollEle ;
509
512
510
513
// only write when it has changed
511
514
if ( this . _fullscreen ) {
@@ -519,7 +522,7 @@ export class Content extends Ion {
519
522
newVal += this . _tabbarHeight ;
520
523
}
521
524
if ( newVal !== this . adjustedTop ) {
522
- this . _scrollEle . style . paddingTop = ( newVal > 0 ? newVal + 'px' : '' ) ;
525
+ scrollEle . style . paddingTop = ( newVal > 0 ? newVal + 'px' : '' ) ;
523
526
this . adjustedTop = newVal ;
524
527
}
525
528
@@ -528,8 +531,12 @@ export class Content extends Ion {
528
531
newVal += this . _tabbarHeight ;
529
532
}
530
533
if ( newVal !== this . adjustedBottom ) {
531
- this . _scrollEle . style . paddingBottom = ( newVal > 0 ? newVal + 'px' : '' ) ;
534
+ scrollEle . style . paddingBottom = ( newVal > 0 ? newVal + 'px' : '' ) ;
532
535
this . adjustedBottom = newVal ;
536
+
537
+ if ( newVal > 0 && this . _footerEle ) {
538
+ this . _footerEle . style . bottom = ( newVal - this . _footerHeight ) + 'px' ;
539
+ }
533
540
}
534
541
535
542
} else {
@@ -539,7 +546,7 @@ export class Content extends Ion {
539
546
newVal += this . _tabbarHeight ;
540
547
}
541
548
if ( newVal !== this . adjustedTop ) {
542
- this . _scrollEle . style . marginTop = ( newVal > 0 ? newVal + 'px' : '' ) ;
549
+ scrollEle . style . marginTop = ( newVal > 0 ? newVal + 'px' : '' ) ;
543
550
this . adjustedTop = newVal ;
544
551
}
545
552
@@ -548,8 +555,12 @@ export class Content extends Ion {
548
555
newVal += this . _tabbarHeight ;
549
556
}
550
557
if ( newVal !== this . adjustedBottom ) {
551
- this . _scrollEle . style . marginBottom = ( newVal > 0 ? newVal + 'px' : '' ) ;
558
+ scrollEle . style . marginBottom = ( newVal > 0 ? newVal + 'px' : '' ) ;
552
559
this . adjustedBottom = newVal ;
560
+
561
+ if ( newVal > 0 && this . _footerEle ) {
562
+ this . _footerEle . style . bottom = ( newVal - this . _footerHeight ) + 'px' ;
563
+ }
553
564
}
554
565
}
555
566
0 commit comments