@quadrel-enterprise-ui/framework 19.6.1-beta.68.1 → 19.6.1-beta.72.1
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.
|
@@ -11257,12 +11257,19 @@ class QdInputComponent {
|
|
|
11257
11257
|
this.clearable = getClearable(this.config) && !this.disabled;
|
|
11258
11258
|
}
|
|
11259
11259
|
handleInput(event) {
|
|
11260
|
-
const
|
|
11261
|
-
|
|
11260
|
+
const target = event.target;
|
|
11261
|
+
const value = target.value;
|
|
11262
|
+
if (target?.validity?.badInput)
|
|
11262
11263
|
return;
|
|
11264
|
+
const cursorPosition = target.selectionStart;
|
|
11263
11265
|
this._value = { ...this._value, value };
|
|
11264
11266
|
this.emitValue();
|
|
11265
11267
|
this._onTouch();
|
|
11268
|
+
requestAnimationFrame(() => {
|
|
11269
|
+
if (target && cursorPosition !== null && target.setSelectionRange) {
|
|
11270
|
+
target.setSelectionRange(cursorPosition, cursorPosition);
|
|
11271
|
+
}
|
|
11272
|
+
});
|
|
11266
11273
|
}
|
|
11267
11274
|
handleOptionSelected(option) {
|
|
11268
11275
|
this._value = { ...this._value, value: option.i18n };
|