Closed Bug 183646 Opened 22 years ago Closed 14 years ago

::-moz-selection does not work in form controls (input[type=text], input[type=password], textarea)

Categories

(Core :: Layout: Text and Fonts, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a4

People

(Reporter: john, Assigned: masayuki)

References

(Blocks 2 open bugs)

Details

(Keywords: css-moz, css3, testcase, Whiteboard: [Hixie-P5])

Attachments

(3 files, 2 obsolete files)

The :moz-selection selector does not appear to work in textareas.  Specifically,
an attempt to change the background color of the selection fails.
Attached file Testcase (obsolete) —
Blocks: 144938
See also:
   http://www.hixie.ch/tests/adhoc/css/selectors/selection/mozilla/004.xml
Assignee: dbaron → glazman
Blocks: 176170
Keywords: testcase
Whiteboard: [Hixie-P5]
*** Bug 211883 has been marked as a duplicate of this bug. ***
Attached file using ::-moz-selection
Current test case doesn't work at all in Moz1.5RC1. Probably because
:-moz-selection is used instead of ::-moz-selection. This test case does work
(selected text turns yellow), but the bug for the textarea still exists.

Hixie,
Since it is now :-moz-selection your test cases don't work either.
testcases updated
Attachment #108311 - Attachment is obsolete: true
Keywords: css-moz, css3
Summary: :moz-selection does not work in textarea → ::moz-selection does not work in textarea
No longer blocks: 68206
OS: Windows XP → All
Hardware: PC → All
Summary: ::moz-selection does not work in textarea → ::-moz-selection does not work in textarea
QA Contact: ian → style-system
Attached file detailed testcase
Includes some form elements and contenteditable one, form elements fails.
Summary: ::-moz-selection does not work in textarea → ::-moz-selection does not work in form controls
I'll post a patch for input/textarea element. This blocks bug 556694's reftest...

Please file some new bugs for other elements, selection is rendered by each element if the element doesn't use nsTextFrame (e.g., <img>, <select>).
Assignee: daniel → nobody
Blocks: 556694
Status: NEW → ASSIGNED
Component: Style System (CSS) → Layout: Text
QA Contact: style-system → layout.fonts-and-text
Summary: ::-moz-selection does not work in form controls → ::-moz-selection does not work in form controls (input[type=text], input[type=password], textarea)
Assignee: nobody → masayuki
Attached patch Patch v1.0 (obsolete) — Splinter Review
I think that nsTextFrame should refer the binding parent's style if the content is in anonymous sub tree.
Attachment #436736 - Flags: review?(dbaron)
Attached patch Patch v1.0.1Splinter Review
fix a nit
Attachment #436736 - Attachment is obsolete: true
Attachment #436819 - Flags: review?(dbaron)
Attachment #436736 - Flags: review?(dbaron)
Comment on attachment 436819 [details] [diff] [review]
Patch v1.0.1

r=dbaron, though I think in the longer term we should redesign ::-moz-selection to work one of the ways I described in http://lists.w3.org/Archives/Public/www-style/2008Oct/0268.html
Attachment #436819 - Flags: review?(dbaron) → review+
http://hg.mozilla.org/mozilla-central/rev/8e6ef255d9d6
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: