chore(): sync with main

This commit is contained in:
Liam DeBeasi
2022-09-02 14:44:56 -04:00
403 changed files with 2104 additions and 2198 deletions

View File

@ -376,12 +376,6 @@ export class Input implements ComponentInterface {
this.isComposing = false;
};
private clearTextOnEnter = (ev: KeyboardEvent) => {
if (ev.key === 'Enter') {
this.clearTextInput(ev);
}
};
private clearTextInput = (ev?: Event) => {
if (this.clearInput && !this.readonly && !this.disabled && ev) {
ev.preventDefault();
@ -470,8 +464,15 @@ export class Input implements ComponentInterface {
aria-label="reset"
type="button"
class="input-clear-icon"
onPointerDown={this.clearTextInput}
onKeyDown={this.clearTextOnEnter}
onPointerDown={(ev) => {
/**
* This prevents mobile browsers from
* blurring the input when the clear
* button is activated.
*/
ev.preventDefault();
}}
onClick={this.clearTextInput}
/>
)}
</Host>