Merge pull request #63 from s72785/patch-7
prevent NaN fixes usability glitch
This commit is contained in:
commit
f1927d7452
1 changed files with 1 additions and 1 deletions
|
@ -8,5 +8,5 @@ calling like
|
||||||
*/
|
*/
|
||||||
function crmnt( e, i ) { /* read: in-/decrement ( dom-element, signed-integer ) */
|
function crmnt( e, i ) { /* read: in-/decrement ( dom-element, signed-integer ) */
|
||||||
var d = parseInt( e.value ) + i;
|
var d = parseInt( e.value ) + i;
|
||||||
e.value = ( d <= 0 )? 0 : d;
|
e.value = ( d <= 0 || isNaN(d) )? 0 : d;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue