Closed
Bug 612730
Opened 14 years ago
Closed 14 years ago
Make :-moz-ui-valid and :-moz-ui-invalid apply for required select elements
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla2.0b8
People
(Reporter: mounir, Assigned: mounir)
References
Details
Attachments
(3 files, 2 obsolete files)
35.77 KB,
patch
|
bzbarsky
:
review+
jst
:
approval2.0+
|
Details | Diff | Splinter Review |
8.72 KB,
patch
|
bzbarsky
:
review+
jst
:
approval2.0+
|
Details | Diff | Splinter Review |
15.16 KB,
patch
|
bzbarsky
:
review+
jst
:
approval2.0+
|
Details | Diff | Splinter Review |
When bug 596511 will be fixed, :-moz-ui-valid and :-moz-ui-invalid should apply on required select elements.
Assignee | ||
Updated•14 years ago
|
Summary: Make :-moz-ui-valid and :-moz-ui-invalid apply when for required select elements → Make :-moz-ui-valid and :-moz-ui-invalid apply for required select elements
Assignee | ||
Comment 1•14 years ago
|
||
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #491402 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 2•14 years ago
|
||
I will write a part 3. Very likely tomorrow morning.
Attachment #491412 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 3•14 years ago
|
||
This is a bit ugly because nsListControlFrame listens to mouse down.
Attachment #491514 -
Flags: review?(bzbarsky)
Comment 4•14 years ago
|
||
Comment on attachment 491402 [details] [diff] [review] Part 1 - :-moz-ui-{in,}valid apply if the selected option has been changed r=me. I'm starting to really hate aNotify.... We should check whether it can actually be false in this code while the current doc is nonnull.
Attachment #491402 -
Flags: review?(bzbarsky) → review+
Comment 5•14 years ago
|
||
Comment on attachment 491412 [details] [diff] [review] Part 2 - :-moz-ui-{in,}valid apply if the user tried to submit the form in an invalid state r=me
Attachment #491412 -
Flags: review?(bzbarsky) → review+
Comment 6•14 years ago
|
||
Comment on attachment 491514 [details] [diff] [review] Part 3 - :-moz-ui-invalid should not apply if the element was valid on focus and :-moz-ui-valid should not apply if no style was applying on focus I don't think anything guarantees that a left-mouse-down will be followed by a blur.
Attachment #491514 -
Flags: review?(bzbarsky) → review-
Assignee | ||
Comment 7•14 years ago
|
||
This is not working correctly for non-combobox select elements but the issue is not important and I really want to have that landed for b8. If you agree Boris, I will open a follow-up and try to fix the specific issue later (in Firefox 4 time frame I hope).
Attachment #491514 -
Attachment is obsolete: true
Attachment #491807 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 8•14 years ago
|
||
I spent some time trying to find a theoretical solution to fix that but nothing seems to work: - we can't select on something else than mousedown ; - we can't set the bits (mCanShow{Inv,V}alidUI) on mousedown (frame or content) ; - we can't set mSelectionChanged later (or cache it) ; - we can't ignore the first selection called by the frame. So, I would say we should change the expected behavior to match what this patch does or even always update the style as soon as there is an user interaction (for all kind of select or only drop down).
Assignee | ||
Updated•14 years ago
|
Keywords: dev-doc-needed
Comment 9•14 years ago
|
||
That last patch can still get us into a state where mUserInteracting is true when the user is doing nothing of the sort, right?
Assignee | ||
Comment 10•14 years ago
|
||
(In reply to comment #9) > That last patch can still get us into a state where mUserInteracting is true > when the user is doing nothing of the sort, right? Sorry, I pushed the wrong patch. It's the same than the obsoleted one :/
Assignee | ||
Comment 11•14 years ago
|
||
Sorry again.
Attachment #491807 -
Attachment is obsolete: true
Attachment #492070 -
Flags: review?(bzbarsky)
Attachment #491807 -
Flags: review?(bzbarsky)
Comment 12•14 years ago
|
||
Comment on attachment 492070 [details] [diff] [review] Part 3 - :-moz-ui-invalid should not apply if the element was valid on focus and :-moz-ui-valid should not apply if no style was applying on focus >+ * Return if s/if/whether/ r=me
Attachment #492070 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Updated•14 years ago
|
Attachment #491402 -
Flags: approval2.0?
Assignee | ||
Updated•14 years ago
|
Attachment #491412 -
Flags: approval2.0?
Assignee | ||
Updated•14 years ago
|
Attachment #492070 -
Flags: approval2.0?
Assignee | ||
Updated•14 years ago
|
Whiteboard: [needs approval]
Updated•14 years ago
|
Attachment #491402 -
Flags: approval2.0? → approval2.0+
Updated•14 years ago
|
Attachment #491412 -
Flags: approval2.0? → approval2.0+
Updated•14 years ago
|
Attachment #492070 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Comment 13•14 years ago
|
||
Pushed: http://hg.mozilla.org/mozilla-central/rev/e077f4fddd25 http://hg.mozilla.org/mozilla-central/rev/8fd7b019a2e6 http://hg.mozilla.org/mozilla-central/rev/f4a67c552e73
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs approval]
Target Milestone: --- → mozilla2.0b8
Comment 14•14 years ago
|
||
Removing dev-doc-needed, as nothing special needs to be called out in the docs. <select> with required is already among the validated form elements that these pseudo-classes are assumed to apply to.
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•