Merge pull request #2213 from SergioCrisostomo/fix-number-input
prevent firing change when typing numbers < min
This commit is contained in:
commit
7a9f6b28fc
1 changed files with 1 additions and 0 deletions
|
@ -263,6 +263,7 @@
|
||||||
if (!isNaN(val) && !isEmptyString) {
|
if (!isNaN(val) && !isEmptyString) {
|
||||||
this.currentValue = val;
|
this.currentValue = val;
|
||||||
|
|
||||||
|
if (event.type == 'input' && val < min) return; // prevent fire early in case user is typing a bigger number. Change will handle this otherwise.
|
||||||
if (val > max) {
|
if (val > max) {
|
||||||
this.setValue(max);
|
this.setValue(max);
|
||||||
} else if (val < min) {
|
} else if (val < min) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue