prevent NaN fixes usability glitch

deleting content of input field results in not useable UI
This commit is contained in:
s72785 2015-05-29 00:06:19 +02:00
parent 58d7a3c443
commit 8155a49cf7

View file

@ -8,5 +8,5 @@ calling like
*/
function crmnt( e, i ) { /* read: in-/decrement ( dom-element, signed-integer ) */
var d = parseInt( e.value ) + i;
e.value = ( d <= 0 )? 0 : d;
e.value = ( d <= 0 || isNaN(d) )? 0 : d;
}