Last Comment Bug 754668 - When resetting a required input, it becomes invalid
: When resetting a required input, it becomes invalid
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla15
Assigned To: Mounir Lamouri (:mounir)
: Andrew Overholt [:overholt]
Depends on: 755322
  Show dependency treegraph
Reported: 2012-05-13 06:23 PDT by Théo Chevalier [:tchevalier]
Modified: 2012-06-01 08:41 PDT (History)
5 users (show)
mounir: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch v1 (20.00 KB, patch)
2012-05-15 09:12 PDT, Mounir Lamouri (:mounir)
ehsan: review+
mounir: checkin+
Details | Diff | Splinter Review

Description User image Théo Chevalier [:tchevalier] 2012-05-13 06:23:06 PDT
See the jsfiddle attached.
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.
Comment 1 User image Boris Zbarsky [:bz] (still a bit busy) 2012-05-13 20:51:55 PDT
And clicking "Reset" again makes the red outline disappear.  That's kinda weird.
Comment 2 User image Mounir Lamouri (:mounir) 2012-05-15 09:12:34 PDT
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.
Comment 3 User image :Ehsan Akhgari 2012-05-15 10:11:41 PDT
Comment on attachment 624068 [details] [diff] [review]
Patch v1

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

Comment 4 User image Ed Morley [:emorley] 2012-06-01 08:41:31 PDT

Note You need to log in before you can comment on or make changes to this bug.