svelte-material-ui
svelte-material-ui copied to clipboard
textfield type ="number" won't accept a "-" as the first character
In trying to enter a negative number into a text field with a type of "number", I can't type a "-" as the first character. I can use the arrows to drop the value below 0, and I can also type a number then go back and add the "-", so it is possible to achieve a negative number, but it is not a good user experience.
Chrome 101.0.4 on Ubuntu 20.04
reproduce
REPL
pre-condition: the TextField
labelled "initZero" has an existing zero, the other two TextField
are empty.
procedures
- click the
TextField
labelled "initZero", use backspace to delete existing zero. - press minus sign
- click the
TextField
labelled "initEmpty". - press minus sign
expected behaviour
- after step 2, there is a minus sign in the
TextField
. - after step 4, there is a minus sign in the
TextField
.
actual behaviour
- after step 2, the
TextField
is empty. - after step 4, the
TextField
is empty.
remarks
I suppose the one initialized with null
value fits expectation best.
I think that this behavior was fixed. Try the latest one 7beta14
.