mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
refactor(input): migrate composition events to JSX bindings (#27182)
Updates the `compositionstart` and `compositionend` events on input to use JSX bindings since issue https://github.com/ionic-team/stencil/issues/3235 was resolved in Stencil v3.
This commit is contained in:
@ -367,13 +367,6 @@ export class Input implements ComponentInterface {
|
||||
|
||||
componentDidLoad() {
|
||||
this.originalIonInput = this.ionInput;
|
||||
const nativeInput = this.nativeInput;
|
||||
if (nativeInput) {
|
||||
// TODO: FW-729 Update to JSX bindings when Stencil resolves bug with:
|
||||
// https://github.com/ionic-team/stencil/issues/3235
|
||||
nativeInput.addEventListener('compositionstart', this.onCompositionStart);
|
||||
nativeInput.addEventListener('compositionend', this.onCompositionEnd);
|
||||
}
|
||||
}
|
||||
|
||||
disconnectedCallback() {
|
||||
@ -384,11 +377,6 @@ export class Input implements ComponentInterface {
|
||||
})
|
||||
);
|
||||
}
|
||||
const nativeInput = this.nativeInput;
|
||||
if (nativeInput) {
|
||||
nativeInput.removeEventListener('compositionstart', this.onCompositionStart);
|
||||
nativeInput.removeEventListener('compositionend', this.onCompositionEnd);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -690,6 +678,8 @@ export class Input implements ComponentInterface {
|
||||
onBlur={this.onBlur}
|
||||
onFocus={this.onFocus}
|
||||
onKeyDown={this.onKeydown}
|
||||
onCompositionstart={this.onCompositionStart}
|
||||
onCompositionend={this.onCompositionEnd}
|
||||
{...this.inheritedAttributes}
|
||||
/>
|
||||
{this.clearInput && !readonly && !disabled && (
|
||||
|
||||
Reference in New Issue
Block a user