fix(inputs): keyboard focus improvements (#16838)

fixes #16815
fixes #16872
fixes #13978
fixes #16610
This commit is contained in:
Manu MA
2019-01-11 19:36:02 +01:00
committed by GitHub
parent 275d385c17
commit 6364e4e2a1
38 changed files with 263 additions and 234 deletions

View File

@ -1,4 +1,4 @@
import { Component, ComponentInterface, Element, Event, EventEmitter, Prop, Watch } from '@stencil/core';
import { Component, ComponentInterface, Element, Event, EventEmitter, Listen, Prop, Watch } from '@stencil/core';
import { Mode, SegmentButtonLayout } from '../../interface';
@ -53,7 +53,8 @@ export class SegmentButton implements ComponentInterface {
}
}
private onClick = () => {
@Listen('click')
onClick() {
this.checked = true;
}
@ -90,7 +91,6 @@ export class SegmentButton implements ComponentInterface {
aria-pressed={this.checked ? 'true' : null}
class="button-native"
disabled={this.disabled}
onClick={this.onClick}
>
<slot></slot>
{this.mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}