diff --git a/src/components/app/app-root.ts b/src/components/app/app-root.ts index f1e462ae00..319bd8806e 100644 --- a/src/components/app/app-root.ts +++ b/src/components/app/app-root.ts @@ -113,14 +113,20 @@ export class IonicApp extends Ion implements OnInit { * @private */ _disableScroll(shouldDisableScroll: boolean) { - console.log('App Root: Scroll Disable Assist', shouldDisableScroll); - if (shouldDisableScroll) { this.stopScroll().then(() => { - this._rafId = nativeTimeout(() => this.setElementClass('disable-scroll', true), 16 * 2); + this._rafId = nativeTimeout(() => { + console.debug('App Root: adding .disable-scroll'); + this.setElementClass('disable-scroll', true); + }, 16 * 2); }); } else { - cancelAnimationFrame(this._rafId); + let plugin = this._stopScrollPlugin; + if (plugin && plugin.cancel) { + plugin.cancel(); + } + clearTimeout(this._rafId); + console.debug('App Root: removing .disable-scroll'); this.setElementClass('disable-scroll', false); } }