perf(item): remove delegatesFocus patch for iOS 13 (#25822)

This commit is contained in:
Liam DeBeasi
2022-08-25 11:34:25 -05:00
committed by GitHub
parent 1eb6fd04d7
commit ee3467c9f1
5 changed files with 4 additions and 129 deletions

View File

@ -25,16 +25,6 @@ export class Textarea implements ComponentInterface {
private textareaWrapper?: HTMLElement;
private inheritedAttributes: Attributes = {};
/**
* This is required for a WebKit bug which requires us to
* blur and focus an input to properly focus the input in
* an item with delegatesFocus. It will no longer be needed
* with iOS 14.
*
* @internal
*/
@Prop() fireFocusEvents = true;
@Element() el!: HTMLElement;
@State() hasFocus = false;
@ -242,18 +232,6 @@ export class Textarea implements ComponentInterface {
}
}
/**
* Sets blur on the native `textarea` in `ion-textarea`. Use this method instead of the global
* `textarea.blur()`.
* @internal
*/
@Method()
async setBlur() {
if (this.nativeInput) {
this.nativeInput.blur();
}
}
/**
* Returns the native `<textarea>` element used under the hood.
*/
@ -332,18 +310,14 @@ export class Textarea implements ComponentInterface {
this.hasFocus = true;
this.focusChange();
if (this.fireFocusEvents) {
this.ionFocus.emit(ev);
}
this.ionFocus.emit(ev);
};
private onBlur = (ev: FocusEvent) => {
this.hasFocus = false;
this.focusChange();
if (this.fireFocusEvents) {
this.ionBlur.emit(ev);
}
this.ionBlur.emit(ev);
};
private onKeyDown = () => {