Skip to main content

Bug Tracker

Side navigation

#8350 closed bug (invalid)

Opened February 22, 2011 05:07PM UTC

Closed February 22, 2011 11:21PM UTC

Last modified March 14, 2012 01:07PM UTC

Returned color of selected option in a select box is incorrect

Reported by: belmass@gmail.com Owned by:
Priority: low Milestone: 1.next
Component: css Version: 1.5
Keywords: Cc:
Blocked by: Blocking:
Description

1. The version(s) of jQuery affected

All

2. The browser (or browsers) that you are able to reproduce the bug in, including version numbers

Firefox only

3. The operating system (or operating systems) you experienced the bug on.

Both Windows 7 and MacOSX

4. Step-by-step instructions on how to reproduce the issue, including any required system configuration changes

Create a <select/> object with multicolor <option> elements inside. Using jQuery try to get color of selected option in the list. Also, try to get color of any other option based on its class or order in <select/> object.

5. A description of what you expect to happen, and what actually happens

Expected to get actual color that selected option has. Instead, Firefox in Windows returns rgb(255,255,255)

and Firefox in OSX returns rgb(0,0,0)

JsFiddle: http://jsfiddle.net/andrei/Nx3Qj/

Attachments (0)
Change History (2)

Changed February 22, 2011 11:21PM UTC by jitter comment:1

component: unfiledcss
priority: undecidedlow
resolution: → invalid
status: newclosed

Thanks for taking the time to contribute to the jQuery project by writing a bug report.

I don't see how this is a jQuery bug. FF simply seems to ignore the style on the select option. It's well known that not all browsers allow you to style input/select/... elements. Also check this somewhat related comment.

If you can show this is really a jQuery bug and not ~~a bug~~ the normal behavior of FF, please report back with a test case and description and request this ticket to be reopened.

Changed May 11, 2011 02:01PM UTC by v comment:2

It DOES get correct color when using "option:eq(0)" selector.

But returns rgb(255,255,255) when using "option:selected".

Therefore I am not sure, if it can be said that this issue is due to "not all browsers allow you to style input/select/... elements". But on the other hand - you probably know better.