Compare input with minValue only when focus lost#15
Compare input with minValue only when focus lost#15Benzolitz wants to merge 1 commit intoEmKayDK:masterfrom Benzolitz:Benzolitz-patch-2
Conversation
Building upon @loicfevrier 's Pull request (#3). - Only compare the user input with the minValue, when focus is lost. Otherwise a positive minValue could lead to problems. - use parseFloat for comparision. "9" > "10" = true / 9 > 10 = false - check first if the value is nothing. Checking if a value even exists after using it is kinda strange to me.
|
Thanks (again) for the pull request. Thanks in advance. |
|
Point 1:
After you typed in 10, try to change the number to 11. When I remove the 0 to add another 1, the script automatically changes the value to minValue. Only possiblities to change:
Point 2: Point 3:
You first check strValue < minValue and then check if strValue even contains something. The logical order makes no sense for me. Example:
your code: check if strValue < minValue AND then check if strValue even contains something. |
Updating changelog and version number to 1.5.3. New minified file.
Building upon @loicfevrier 's Pull request (#3).