diff --git a/src/components/app/app.ts b/src/components/app/app.ts index 807888b147c..36be717db6b 100644 --- a/src/components/app/app.ts +++ b/src/components/app/app.ts @@ -107,7 +107,7 @@ export class App { * @return {boolean} */ isScrolling(): boolean { - return (this._scrollTime + 64 > Date.now()); + return (this._scrollTime + 48 > Date.now()); } /** diff --git a/src/components/content/content.ts b/src/components/content/content.ts index bb4b1a46002..761910d04c9 100644 --- a/src/components/content/content.ts +++ b/src/components/content/content.ts @@ -91,7 +91,7 @@ export class Content extends Ion { constructor( private _elementRef: ElementRef, - private _config: Config, + config: Config, private _app: App, private _keyboard: Keyboard, private _zone: NgZone, @@ -99,7 +99,7 @@ export class Content extends Ion { @Optional() private _tabs: Tabs ) { super(_elementRef); - this._sbPadding = _config.getBoolean('statusbarPadding', false); + this._sbPadding = config.getBoolean('statusbarPadding', false); if (viewCtrl) { viewCtrl.setContent(this); @@ -111,17 +111,11 @@ export class Content extends Ion { * @private */ ngOnInit() { - let self = this; - self._scrollEle = self._elementRef.nativeElement.children[0]; + this._scrollEle = this._elementRef.nativeElement.children[0]; - self._zone.runOutsideAngular(function() { - self._scroll = new ScrollView(self._scrollEle); - - if (self._config.getBoolean('tapPolyfill')) { - self._scLsn = self.addScrollListener(function() { - self._app.setScrolling(); - }); - } + this._zone.runOutsideAngular(() => { + this._scroll = new ScrollView(this._scrollEle); + this._scLsn = this.addScrollListener(this._app.setScrolling); }); } @@ -131,7 +125,7 @@ export class Content extends Ion { ngOnDestroy() { this._scLsn && this._scLsn(); this._scroll && this._scroll.destroy(); - this._scrollEle = this._footerEle = this._scLsn = null; + this._scrollEle = this._footerEle = this._scLsn = this._scroll = null; } /** diff --git a/src/components/tap-click/tap-click.ts b/src/components/tap-click/tap-click.ts index 0f0c48cbc9e..383c47f1a69 100644 --- a/src/components/tap-click/tap-click.ts +++ b/src/components/tap-click/tap-click.ts @@ -122,7 +122,7 @@ export class TapClick { this.startCoord = pointerCoord(ev); let now = Date.now(); - if (this.lastActivated + 150 < now) { + if (this.lastActivated + 150 < now && !this.app.isScrolling()) { this.activator && this.activator.downAction(ev, activatableEle, this.startCoord); this.lastActivated = now; }