* refactor(overlays): overlays now are enabled via ionViewDidEnter (#6811) closes #6753

overalys now are enabled via ionViewDidEnter

* style(overlays): fixed tslint error

fixed tslint error

* style(overlays): formatting

formatting

* refactor(overlays): minor refactor to match style

minor refactor to match style
This commit is contained in:
Dan Bucholtz
2016-06-09 13:35:03 -05:00
committed by GitHub
parent 7a3477b782
commit 2be96f29b2
8 changed files with 42 additions and 65 deletions

5
src/util/key.ts Normal file
View File

@@ -0,0 +1,5 @@
export enum Key {
ENTER = <any> 13,
ESCAPE = <any> 27,
TAB = <any> 9
};

View File

@@ -3,6 +3,7 @@ import {Injectable, NgZone} from '@angular/core';
import {Config} from '../config/config';
import {Form} from './form';
import {hasFocusedTextInput, nativeRaf, rafFrames, nativeTimeout} from './dom';
import {Key} from './key';
/**
* @name Keyboard
@@ -152,7 +153,7 @@ export class Keyboard {
// default is to add the focus-outline when the tab key is used
function keyDown(ev: KeyboardEvent) {
if (!isKeyInputEnabled && ev.keyCode === 9) {
if (!isKeyInputEnabled && ev.keyCode === Key.TAB) {
isKeyInputEnabled = true;
enableKeyInput();
}