Closed Bug 622597 Opened 9 years ago Closed 9 years ago

form.novalidate should not be taken into account for validity UI when focusing an element

Categories

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

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla2.0b11

People

(Reporter: mounir, Assigned: mounir)

References

()

Details

Attachments

(1 file)

1. Open test case (URL field) ;
2. Type something in the text field ;

Actual result: the text field is invalid but :-moz-ui-invalid doesn't apply.
Expected result: the text field is invalid and :-moz-ui-invalid applies.

(if you un-focus the text field, you will see :-moz-ui-invalid applying)
Wrong testcase...

1. Open test case (URL field) ;
2. Type one character in the text field ;
3. Blur the text field ;
3. Type one character in the text field.

Actual result: the text field is invalid but :-moz-ui-invalid doesn't apply.
Expected result: the text field is invalid and :-moz-ui-invalid applies.
Attached patch Patch v1Splinter Review
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #501004 - Flags: review?(jonas)
Whiteboard: [needs-review]
Whiteboard: [needs-review] → [needs-review][passed-try]
Jonas, this is also fixing another issue: if .setCustomValidity() is used and novalidate is set on the form owner, it will prevent the invalid UI to be shown.
Whiteboard: [needs-review][passed-try] → [needs landing][passed try]
Pushed:
http://hg.mozilla.org/mozilla-central/rev/42d7daff9dd3
Flags: in-testsuite+
Whiteboard: [needs landing][passed try]
Target Milestone: --- → mozilla2.0b11
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.