fix(input): fix tabbing between tappable inputs

This commit is contained in:
Adam Bradley
2016-11-18 15:20:53 -06:00
parent 86b158008d
commit c4cf9df387
5 changed files with 74 additions and 12 deletions

View File

@ -2,7 +2,7 @@ import { AfterContentInit, Component, ElementRef, EventEmitter, forwardRef, Host
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { Config } from '../../config/config';
import { Form } from '../../util/form';
import { Form, IonicTapInput } from '../../util/form';
import { Ion } from '../ion';
import { isTrueProperty } from '../../util/util';
import { Item } from '../item/item';
@ -72,7 +72,7 @@ export const CHECKBOX_VALUE_ACCESSOR: any = {
providers: [CHECKBOX_VALUE_ACCESSOR],
encapsulation: ViewEncapsulation.None,
})
export class Checkbox extends Ion implements AfterContentInit, ControlValueAccessor, OnDestroy {
export class Checkbox extends Ion implements IonicTapInput, AfterContentInit, ControlValueAccessor, OnDestroy {
/** @private */
_checked: boolean = false;
/** @private */
@ -210,6 +210,13 @@ export class Checkbox extends Ion implements AfterContentInit, ControlValueAcces
this.onTouched();
}
/**
* @private
*/
initFocus() {
this._elementRef.nativeElement.querySelector('button').focus();
}
/**
* @private
*/