cubing / mark2

Client-Side Javascript WCA-Style Scrambler
https://www.cubing.net/mark2/
7 stars 6 forks source link

Firefox doesn't handle number input types well. #128

Closed lgarron closed 12 years ago

lgarron commented 12 years ago

From Sébastien: "When I click into a textfield of an event and delete the number in there, then immidiately "NaN" appears and I can't just enter another number. You should better allow empty fields and handle them as zeros."

Confirmed. I don't know what to do about this, because the browser is supposed to do this correctly on its own.

There's probably a hack with reasonable tradeoffs.

MLSTRM commented 12 years ago

Same thing happens on IE9.

Its probably this: scramble.changeNumRounds("X", parseInt(this.value)); Maybe when empty, recieves a null value, so throws an error?

lgarron commented 12 years ago

That should fix it. If you delete all the text in Firefox, it just won't do anything until you start typing a new digit.