When resetting a required input, it becomes invalid

RESOLVED FIXED in mozilla15

Status

()

Core
DOM: Core & HTML
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: tchevalier, Assigned: mounir)

Tracking

Trunk
mozilla15
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

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.
(Assignee)

Updated

5 years ago
Version: unspecified → Trunk
(Assignee)

Comment 2

5 years ago
Created attachment 624068 [details] [diff] [review]
Patch v1

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+
(Assignee)

Updated

5 years ago
Depends on: 755322
(Assignee)

Updated

5 years ago
Flags: in-testsuite+
Target Milestone: --- → mozilla15
(Assignee)

Updated

5 years ago
Attachment #624068 - Flags: checkin+
https://hg.mozilla.org/mozilla-central/rev/32b0dd97f69b
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.