chore(focus): create reusable focusOutActiveElement()

This commit is contained in:
Adam Bradley
2016-11-21 11:40:33 -06:00
parent 3b304974ec
commit 8d7d7bdaba
5 changed files with 17 additions and 24 deletions

View File

@ -1,7 +1,7 @@
import { Component, Renderer, ElementRef, HostListener, ViewEncapsulation } from '@angular/core';
import { Config } from '../../config/config';
import { Form } from '../../util/form';
import { focusOutActiveElement } from '../../util/dom';
import { Key } from '../../util/key';
import { NavParams } from '../../navigation/nav-params';
import { ViewController } from '../../navigation/view-controller';
@ -60,7 +60,6 @@ export class ActionSheetCmp {
private _viewCtrl: ViewController,
private _config: Config,
private _elementRef: ElementRef,
private _form: Form,
gestureCtrl: GestureController,
params: NavParams,
renderer: Renderer
@ -123,7 +122,7 @@ export class ActionSheetCmp {
}
ionViewDidEnter() {
this._form.focusOut();
focusOutActiveElement();
let focusableEle = this._elementRef.nativeElement.querySelector('button');
if (focusableEle) {