<input type=number> shows inappropriate console warning message for floating point out of range
Reported by
justja...@gmail.com,
Nov 16 2017
|
||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
Steps to reproduce the problem:
1. Make an HTML file with just this line:
<input type="number" value="1.79E+309">
2. On the page, the value of input is an empty string. In the devtools, the warning message:
The specified value "1.79E+309" is not a valid number. The value must match to the following regular expression: -?(\d+|\d+\.\d+|\.\d+)([eE][-+]?\d+)?
What is the expected behavior?
What went wrong?
The warning message is incorrect.
execute the code:
/-?(\d+|\d+\.\d+|\.\d+)([eE][-+]?\d+)?/.test("1.79E+309")
the result is: true
Did this work before? N/A
Chrome version: 62.0.3202.94 Channel: stable
OS Version: 6.3
Flash Version:
,
Nov 16 2017
Thanks for the report. The value you've shown is just above the max double-precision number. According to the spec, the number input has a parse error if the value is not in the set of "IEEE 754 double-precision floating-point values". tkent@, could you please take a look?
,
Nov 17 2017
But the warning message shown in devtools is "... The value must match to the following regular expression..."
,
Jan 9 2018
,
Jan 11 2018
,
Jan 11
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 15
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by manoranj...@chromium.org
, Nov 16 2017