Skip to content

Commit

Permalink
fix(menu): disable menu swipe while transitioning
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Nov 17, 2016
1 parent 0883f98 commit 168428e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/menu/menu.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EventEmitter, Input, NgZone, Output, Renderer, ViewChild, ViewEncapsulation } from '@angular/core';

import { App } from '../app/app';
import { Backdrop } from '../backdrop/backdrop';
import { Config } from '../../config/config';
import { isTrueProperty, assert } from '../../util/util';
Expand Down Expand Up @@ -303,7 +304,8 @@ export class Menu {
private _renderer: Renderer,
private _keyboard: Keyboard,
private _zone: NgZone,
private _gestureCtrl: GestureController
private _gestureCtrl: GestureController,
private _app: App
) {
this._gestureBlocker = _gestureCtrl.createBlocker({
disable: [GESTURE_GO_BACK_SWIPE]
Expand Down Expand Up @@ -427,7 +429,10 @@ export class Menu {
* @private
*/
canSwipe(): boolean {
return this._isEnabled && this._isSwipeEnabled && !this._isAnimating;
return this._isEnabled &&
this._isSwipeEnabled &&
!this._isAnimating &&
this._app.isEnabled();
}

/**
Expand Down

0 comments on commit 168428e

Please sign in to comment.