HTML output element default value
Categories
(Core :: DOM: Forms, defect, P3)
Tracking
()
People
(Reporter: mori79, Assigned: emilio)
References
()
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36
Steps to reproduce:
It seems that Firefox doesn't understand HTMLOutputElement.defaultValue:
console.log(document.getElementById('output').defaultValue);
<output id="output">60</output>
More info: https://stackoverflow.com/questions/55263957/html-output-element-default-value-in-firefox
Actual results:
It shows an empty string.
Expected results:
It should show 60.
Comment 1•5 years ago
|
||
Hi @Mori, I've tested this issue and here is my result after that:
[Platforms affected]: Windows 10, Mac OS X, Ubuntu 16.04
[Firefox versions affected]: latest nightly 68.0a1, beta 67.0b4 and release 66.0.1
=> on all machines and Firefox versions the issue can be reproduced. An empty string is parsed after clicking on the "Reset" button.
Additionally, it could be duplicate of 1422260.
Updated•5 years ago
|
Comment 2•5 years ago
|
||
John, given bug 1422260, could you take a look at this. Should be some simple tweak somewhere.
Comment 3•5 years ago
|
||
Sure, I'm going to work on this. :)
Comment 4•5 years ago
|
||
I use comment0 as test case to test other browsers, it turns out Firefox(65.0.1) and Safari(12.0.3) have the same issue which is defaultValue is missing, but Chrome(72.0.3626.121) and Edge(17.17134) doesn't have this issue.
Comment 5•5 years ago
|
||
Worth to check then what the spec says :)
Comment 6•5 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #5)
Worth to check then what the spec says :)
Here is the spec said[1]. After clarifying by Anne, we should follow output.defaultValue
as the spec said which expects the same result as Chrome.
[1] https://html.spec.whatwg.org/multipage/form-elements.html#concept-output-defaultvalue
Comment 7•5 years ago
|
||
Comment 8•5 years ago
|
||
Before sending the patch to review, there is an open issue for the output element's default value[1] that we need to consider.
Updated•5 years ago
|
Updated•4 years ago
|
Comment 9•3 years ago
|
||
John, care to pick this up again? The specification has been clarified.
http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2835 is another test from bug 975527.
Updated•3 years ago
|
Comment 11•3 years ago
|
||
Yes, I will take a look. Keep NI for tracking.
Comment 12•3 years ago
|
||
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 13•3 years ago
|
||
The patch looks good and matches the spec, any reason not to land it?
Comment 14•3 years ago
•
|
||
I will s(In reply to Emilio Cobos Álvarez (:emilio) from comment #13)
The patch looks good and matches the spec, any reason not to land it?
Thank you for reminding me. I will land it soon.
Comment 15•3 years ago
|
||
Pushed by jdai@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/df09780eb6be Fix HTML output element default value is absent; r=emilio DONTBUILD
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/28957 for changes under testing/web-platform/tests
Comment 17•3 years ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Updated•3 years ago
|
Description
•