ucdavis / Harvest

Harvest Farm Project Tracking Website and Mobile App
MIT License
2 stars 1 forks source link

Rh/firefox decimals #886

Closed laholstege closed 10 months ago

laholstege commented 10 months ago

closes #884

the issue was that the state of the input could not be changed to something that did not pass parseFloat(). now the state of the input can be erroneous and our onChange() and errors still work the same, the user is just actually allowed to type whatever they want and our parent state will only change to something that passes parseFloat().

in firefox this change lets the user type non-numbers into the input, though they don't pass validation. chrome is nice and limits it to numbers. i do not have edge installed lol

not sure if there's anywhere else that needs a stateful input? @jSylvestre

jSylvestre commented 10 months ago

Edge is Chromium so shouldn't be an issue. I'll test tomorrow. There is also an acreage input that has the same issue.