Closed Bug 754668 Opened 9 years ago Closed 9 years ago

When resetting a required input, it becomes invalid

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: tchevalier, Assigned: mounir)

References

()

Details

Attachments

(1 file)

See the jsfiddle attached.
STR: 
1) Fill in the fields with a name, an email address, a message
2) Click on "Reset"

A red border appears around the inputs, whereas the textarea behavior is good: no red border.

Expected: All the fields should be cleared, and no red border should appear.

Works on all the others browsers.
And clicking "Reset" again makes the red outline disappear.  That's kinda weird.
Version: unspecified → Trunk
Attached patch Patch v1Splinter Review
nsTextEditorState was setting mValueChanged to true when resetting the value to the default value. I could have written a patch setting mValueChanged to false after resetting the value but I think that would have just hidden the issue given that there are other situations where we don't want to update mValueChanged.
Assignee: nobody → mounir
Status: NEW → ASSIGNED
Attachment #624068 - Flags: review?(ehsan)
Comment on attachment 624068 [details] [diff] [review]
Patch v1

Review of attachment 624068 [details] [diff] [review]:
-----------------------------------------------------------------

r=me
Attachment #624068 - Flags: review?(ehsan) → review+
Depends on: 755322
Flags: in-testsuite+
Target Milestone: --- → mozilla15
Attachment #624068 - Flags: checkin+
https://hg.mozilla.org/mozilla-central/rev/32b0dd97f69b
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.