Incorrect browser validation message for number inputs #11851
Labels
good first issue
good first issues for new contributors
preferences
issues related to preferences
ui/ux
issues related to user interface / user experience
Bug Description:
For any preference number input, including those that should accept floats, a validation failure message is shown by the browser itself if a float is enterede:
Steps to Reproduce:
The number input is created here. There, the
type
is set to number and nostep
is set. By default, that means that thestep
is 1, and fractional values will be treated as invalid by the browser.One solution is to just add
.step = 'any'
. A more sophisticated solution would check whether the intended type of the input isinteger
or not and then set thestep
value approppriately.Additional Information
The text was updated successfully, but these errors were encountered: