fix(isEnabled): do not disable during menu close

This commit is contained in:
Adam Bradley
2015-09-17 21:55:53 -05:00
parent 5fbc142dae
commit 2ecde315f2
3 changed files with 8 additions and 10 deletions

View File

@@ -148,7 +148,6 @@ export class Menu extends Ion {
this.getBackdropElement().classList.add('show-backdrop');
this._disable();
this.app.setEnabled(false);
}
_after(isOpen) {
@@ -165,18 +164,16 @@ export class Menu extends Ion {
this.getNativeElement().classList.remove('show-menu');
this.getBackdropElement().classList.remove('show-backdrop');
}
this.app.setEnabled(true);
}
_disable() {
// used to prevent unwanted opening/closing after swiping open/close
// or swiping open the menu while pressing down on the menu-toggle
this._disableTime = Date.now();
this._disableTime = Date.now() + 300;
}
_isDisabled() {
return this._disableTime + 300 > Date.now();
return this._disableTime > Date.now();
}
/**