@momentum-design/components 0.133.36 → 0.133.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -166,7 +166,7 @@ declare class Input extends Input_base implements AssociatedFormControl {
|
|
|
166
166
|
* Updates the value and sets the validity of the input field.
|
|
167
167
|
* @internal
|
|
168
168
|
*/
|
|
169
|
-
protected onInput(): void;
|
|
169
|
+
protected onInput(event: Event): void;
|
|
170
170
|
/**
|
|
171
171
|
* Handles the change event of the input field.
|
|
172
172
|
* Updates the value and sets the validity of the input field.
|
|
@@ -197,10 +197,16 @@ class Input extends KeyToActionMixin(AutoFocusOnMountMixin(FormInternalsMixin(Da
|
|
|
197
197
|
* Updates the value and sets the validity of the input field.
|
|
198
198
|
* @internal
|
|
199
199
|
*/
|
|
200
|
-
onInput() {
|
|
200
|
+
onInput(event) {
|
|
201
201
|
this.updateValue();
|
|
202
202
|
this.setInputValidity();
|
|
203
203
|
this.checkValidity();
|
|
204
|
+
// Some versions of the 'input' event are not composed.
|
|
205
|
+
// If the event is not composed, we need to re-dispatch the same event to ensure it is propagated correctly.
|
|
206
|
+
if (!event.composed) {
|
|
207
|
+
const EventConstructor = event.constructor;
|
|
208
|
+
this.dispatchEvent(new EventConstructor(event.type, event));
|
|
209
|
+
}
|
|
204
210
|
}
|
|
205
211
|
/**
|
|
206
212
|
* Handles the change event of the input field.
|