Number input fails validation if javascript changes it to a valid value
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | affected |
People
(Reporter: brunoaiss, Unassigned)
Details
Attachments
(3 files)
If a number input is loaded with its value input containing an invalid value, that value is correctly corrected when it is presented to the user.
But then, if javascript goes changes the HTMLInputElement's value to a valid value (and keeping the tag's value attribute an invalid value), the input gets red for being invalid, although the value is actually valid.
See the attached page for an example.
Here's the counter-part that doesn't display the bug.
I uploaded to show the change that activates the bug.
Comment 3•5 years ago
|
||
(In reply to brunoais from comment #2)
Did I set this ticket correctly?
Yes, you're awesome, thank you.
I'll change the priority to default so it will fall into our radar for regular bug triage. Thank you again.
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #3)
(In reply to brunoais from comment #2)
Did I set this ticket correctly?
Yes, you're awesome, thank you.
I'll change the priority to default so it will fall into our radar for regular bug triage. Thank you again.
You're welcome. Thank you for <24h answer.
Next time I'll take into account and keep the P unset.
Comment 5•5 years ago
|
||
Could reproduce this on Ubuntu 18.04. Also with simplified default value of "38.2" (doesn't happen for 38). Will first need to check what the spec states about this.
Comment 6•5 years ago
|
||
(In reply to brunoais from comment #4)
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #3)
(In reply to brunoais from comment #2)
Did I set this ticket correctly?
Yes, you're awesome, thank you.
I'll change the priority to default so it will fall into our radar for regular bug triage. Thank you again.You're welcome. Thank you for <24h answer.
Next time I'll take into account and keep the P unset.
That's the best!
Updated•5 years ago
|
Comment 7•2 years ago
|
||
The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.
Updated•2 years ago
|
Still behaving wrong.
However, the way it is wrong is different.
I change the value and even if I follow the help text, I still can't get the input to validate
Description
•