Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Is This a Bug in React, Chromium, or the HTML Spec? (sharif.io)
2 points by Samin100 on Aug 23, 2019 | hide | past | favorite | 2 comments


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.


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/6556 https://bugs.chromium.org/p/chromium/issues/detail?id=379122




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: