mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
refactor(action-sheet): restructure action-sheet, move controller to separate module
restructure action-sheet, move controller to separate module
This commit is contained in:
@ -3,7 +3,7 @@ import { Component, ElementRef, HostListener, Renderer, ViewEncapsulation } from
|
||||
import { assert } from '../../util/util';
|
||||
import { BlockerDelegate, GestureController, BLOCK_ALL } from '../../gestures/gesture-controller';
|
||||
import { Config } from '../../config/config';
|
||||
import { Key } from '../../platform/key';
|
||||
import { KEY_ESCAPE } from '../../platform/key';
|
||||
import { Platform } from '../../platform/platform';
|
||||
import { NavParams } from '../../navigation/nav-params';
|
||||
import { NavOptions } from '../../navigation/nav-util';
|
||||
@ -135,11 +135,9 @@ export class ActionSheetCmp {
|
||||
|
||||
@HostListener('body:keyup', ['$event'])
|
||||
keyUp(ev: KeyboardEvent) {
|
||||
if (this.enabled && this._viewCtrl.isLast()) {
|
||||
if (ev.keyCode === Key.ESCAPE) {
|
||||
console.debug('actionsheet, escape button');
|
||||
this.bdClick();
|
||||
}
|
||||
if (this.enabled && ev.keyCode === KEY_ESCAPE && this._viewCtrl.isLast()) {
|
||||
console.debug('actionsheet, escape button');
|
||||
this.bdClick();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user