
Is This a Bug in React, Chromium, or the HTML Spec? - Samin100
https://sharif.io/better-react-number-input/
======
GrumpyNl
Its expected behaviour. Its not a problem, you can not enter a letter in a
number input. Its not a bug, there is nothing wrong there.

~~~
Samin100
You can input a letter in a number input (e), however the interesting part is
how Chromium defines the input’s value IDL attribute. Chromium evaluates the
user-inputted string to either a floating point number or an empty string,
which can cause state problems when the user inputs an incomplete number with
an exponent (2e).

This leads to many developers believing there’s a bug in the framework/browser
they’re using, when in reality it’s the result of a less-than-ideal HTML spec.

[https://github.com/facebook/react/issues/10738](https://github.com/facebook/react/issues/10738)
[https://github.com/facebook/react/issues/6556](https://github.com/facebook/react/issues/6556)
[https://bugs.chromium.org/p/chromium/issues/detail?id=379122](https://bugs.chromium.org/p/chromium/issues/detail?id=379122)

