svelte-material-ui icon indicating copy to clipboard operation
svelte-material-ui copied to clipboard

textfield type ="number" won't accept a "-" as the first character

Open Sarah-W opened this issue 2 years ago • 2 comments

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

Sarah-W avatar May 09 '22 03:05 Sarah-W

reproduce

REPL pre-condition: the TextField labelled "initZero" has an existing zero, the other two TextField are empty.

procedures

  1. click the TextField labelled "initZero", use backspace to delete existing zero.
  2. press minus sign
  3. click the TextField labelled "initEmpty".
  4. 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.

li6in9muyou avatar May 13 '22 08:05 li6in9muyou

I think that this behavior was fixed. Try the latest one 7beta14.

ppcamp avatar Jul 14 '23 11:07 ppcamp