We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fd245f commit 7e03465Copy full SHA for 7e03465
src/vaadin-number-field.html
@@ -418,6 +418,21 @@
418
419
return super.checkValidity();
420
}
421
+
422
+ /**
423
+ * Native [type=number] inputs don't update their value
424
+ * when you are entering input that the browser is unable to parse
425
+ * e.g. "--5", hence we have to override this method from `InputMixin`
426
+ * so that, when value is empty, it would additionally check
427
+ * for bad input based on the native `validity.badInput` property.
428
+ *
429
+ * @param {InputEvent} event
430
+ * @protected
431
+ * @override
432
+ */
433
+ _setHasInputValue(event) {
434
+ this._hasInputValue = event.target.value.length > 0 || event.target.validity.badInput;
435
+ }
436
437
438
window.customElements.define(NumberFieldElement.is, NumberFieldElement);
0 commit comments