Bug 582767 - Use more sensible increment for textbox[type=number] [r=mfinkle]

This commit is contained in:
Matt Brubeck 2010-07-28 17:49:05 -07:00
parent 48e68724a6
commit 4fc47a482d

View File

@ -264,13 +264,12 @@ var ViewConfig = {
},
getIncrementForValue: function getIncrementForValue(aValue) {
let count = 0;
while (aValue > 10) {
let count = 1;
while (aValue >= 100) {
aValue /= 10;
count++;
count *= 10;
}
return Math.max(1, count * 10);
return count;
}
};