diff --git a/src/components/tabs/tab.ts b/src/components/tabs/tab.ts index 6a64fb9f1..48b8a3dcb 100644 --- a/src/components/tabs/tab.ts +++ b/src/components/tabs/tab.ts @@ -122,7 +122,7 @@ export class CoreTabComponent implements OnInit, OnDestroy { // Setup tab scrolling. 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() : this.element.querySelector('ion-content > .scroll-content'); diff --git a/src/components/tabs/tabs.ts b/src/components/tabs/tabs.ts index 7d8944949..5d457bfd8 100644 --- a/src/components/tabs/tabs.ts +++ b/src/components/tabs/tabs.ts @@ -438,7 +438,7 @@ export class CoreTabsComponent implements OnInit, AfterViewInit, OnChanges, OnDe this.originalTabsContainer.style.transform = 'translateY(-' + scroll + 'px)'; this.originalTabsContainer.style.paddingBottom = this.tabBarHeight - scroll + 'px'; } - this.lastScroll = parseInt(scrollElement.scrollTop, 10); + this.lastScroll = scroll; } /**