Merge pull request #1930 from crazyserver/MOBILE-2937-2

MOBILE-2937 tabs: Fix smooth top tabs scroll on iOS
main
Juan Leyva 2019-05-23 11:33:17 +02:00 committed by GitHub
commit e41c38ee4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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');

View File

@ -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;
}
/**