mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
perf(input): passive event listener for touch start events (#25610)
Resolves #25599
This commit is contained in:
@ -496,8 +496,7 @@ export class Input implements ComponentInterface {
|
|||||||
aria-label="reset"
|
aria-label="reset"
|
||||||
type="button"
|
type="button"
|
||||||
class="input-clear-icon"
|
class="input-clear-icon"
|
||||||
onTouchStart={this.clearTextInput}
|
onPointerDown={this.clearTextInput}
|
||||||
onMouseDown={this.clearTextInput}
|
|
||||||
onKeyDown={this.clearTextOnEnter}
|
onKeyDown={this.clearTextOnEnter}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
@ -31,7 +31,7 @@ export const enableScrollAssist = (
|
|||||||
jsSetFocus(componentEl, inputEl, contentEl, footerEl, keyboardHeight);
|
jsSetFocus(componentEl, inputEl, contentEl, footerEl, keyboardHeight);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
componentEl.addEventListener('touchstart', touchStart, true);
|
componentEl.addEventListener('touchstart', touchStart, { capture: true, passive: true });
|
||||||
componentEl.addEventListener('touchend', touchEnd, true);
|
componentEl.addEventListener('touchend', touchEnd, true);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
Reference in New Issue
Block a user