Skip to content

Commit 168428e

Browse files
committed
fix(menu): disable menu swipe while transitioning
1 parent 0883f98 commit 168428e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/components/menu/menu.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EventEmitter, Input, NgZone, Output, Renderer, ViewChild, ViewEncapsulation } from '@angular/core';
22

3+
import { App } from '../app/app';
34
import { Backdrop } from '../backdrop/backdrop';
45
import { Config } from '../../config/config';
56
import { isTrueProperty, assert } from '../../util/util';
@@ -303,7 +304,8 @@ export class Menu {
303304
private _renderer: Renderer,
304305
private _keyboard: Keyboard,
305306
private _zone: NgZone,
306-
private _gestureCtrl: GestureController
307+
private _gestureCtrl: GestureController,
308+
private _app: App
307309
) {
308310
this._gestureBlocker = _gestureCtrl.createBlocker({
309311
disable: [GESTURE_GO_BACK_SWIPE]
@@ -427,7 +429,10 @@ export class Menu {
427429
* @private
428430
*/
429431
canSwipe(): boolean {
430-
return this._isEnabled && this._isSwipeEnabled && !this._isAnimating;
432+
return this._isEnabled &&
433+
this._isSwipeEnabled &&
434+
!this._isAnimating &&
435+
this._app.isEnabled();
431436
}
432437

433438
/**

0 commit comments

Comments
 (0)