Closed Bug 1422260 Opened 7 years ago Closed 2 years ago

The defaultValue for HTMLOutputElement is set to "" after reset steps in our implementation

Categories

(Core :: DOM: Forms, defect, P3)

defect

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: jdai, Assigned: avandolder)

References

()

Details

(Keywords: good-first-bug)

Attachments

(1 file)

+++ This bug was initially created as a follow-up of bug 1419316 comment 3+++

Yeah, I think Reset has similar issue.
And please add some comment why mDefaultValue can't be passed. It is very much non-obvious. Had to look at the mutation observing methods.

Feel free to fix Reset (+ add a test) if needed in a separate bug.

Test: http://software.hixie.ch/utilities/js/live-dom-viewer/saved/5597
Priority: -- → P2
Assignee: jdai → nobody

I'm going to start working on this bug.

Assignee: nobody → jdai
Status: NEW → ASSIGNED

The spec[1] mentions about reset for output elements:
The reset algorithm for output elements is to set the element's value mode flag to default and then to set the element's textContent IDL attribute to the value of the element's default value (thus replacing the element's child nodes).

After taking comment 0 as test case, it turns out all the browsers don't fully follow the spec, Chrome(72.0.3626.121) and Safari(12.0.3) don't do as spec said replacing the element's child nodes, Firefox(65.0.1) and Edge(17.17134) don't follow part of spec said set the element's textContent IDL attribute to the value of the element's default value.

[1] https://html.spec.whatwg.org/#the-output-element:concept-form-reset-control

Here is a spec issue[1] is discussing, since this portion of the spec is going to be changed, I'll wait for the spec finalize then fix in bug 1537689 at once.

[1] https://github.com/whatwg/html/issues/4163

Assignee: jdai → nobody
Status: ASSIGNED → NEW
Depends on: 1537689
Component: DOM: Core & HTML → DOM: Forms
Severity: normal → S3
Keywords: good-first-bug
Priority: P2 → P3

Assigning to Adam, as he has been looking into this.

Assignee: nobody → avandolder
Status: NEW → ASSIGNED
Pushed by avandolder@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fcb266abcf2d
Prevent default value of output element from being truncated after reset. r=edgar
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: