EmKayDK / jstepper

A jQuery plugin usable for making a numeric textfield value easy to increase or decrease
ISC License
18 stars 6 forks source link

error in AddOrSubtractTwoFloats #7

Closed jedierikb closed 9 years ago

jedierikb commented 10 years ago
$('#txtTesting').jStepper({minValue:0, maxValue:23.999, minLength:2, minDecimals:3, maxDecimals: 3, decimalSeparator: '.'});

Enter value 0.999, then decrement one step. If you look at the return value in AddOrSubtractTwoFloats for this operation, you will note it results in a NaN. This is because you are trying to cast

Number( ".0-1" )

It seems this function did not account for negative numbers properly.

EmKayDK commented 9 years ago

Thank you for the bug report. I will investigate and make a fix as soon as possible.

EmKayDK commented 9 years ago

This bug is now solved with the 1.5.0 release.

Thanks again :+1: