Merge pull request #1930 from crazyserver/MOBILE-2937-2
MOBILE-2937 tabs: Fix smooth top tabs scroll on iOSmain
commit
e41c38ee4c
|
@ -122,7 +122,7 @@ export class CoreTabComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
// Setup tab scrolling.
|
// Setup tab scrolling.
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// Workarround to solve undefined this.scroll on tab change.
|
// Workaround to solve undefined this.scroll on tab change.
|
||||||
const scroll: HTMLElement = this.content ? this.content.getScrollElement() :
|
const scroll: HTMLElement = this.content ? this.content.getScrollElement() :
|
||||||
this.element.querySelector('ion-content > .scroll-content');
|
this.element.querySelector('ion-content > .scroll-content');
|
||||||
|
|
||||||
|
|
|
@ -438,7 +438,7 @@ export class CoreTabsComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
||||||
this.originalTabsContainer.style.transform = 'translateY(-' + scroll + 'px)';
|
this.originalTabsContainer.style.transform = 'translateY(-' + scroll + 'px)';
|
||||||
this.originalTabsContainer.style.paddingBottom = this.tabBarHeight - scroll + 'px';
|
this.originalTabsContainer.style.paddingBottom = this.tabBarHeight - scroll + 'px';
|
||||||
}
|
}
|
||||||
this.lastScroll = parseInt(scrollElement.scrollTop, 10);
|
this.lastScroll = scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue