Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#8350 closed bug (invalid)

Returned color of selected option in a select box is incorrect

Reported by: belmass@… 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/

Change History (2)

comment:1 Changed 9 years ago by jitter

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.

comment:2 Changed 8 years ago by v

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.

Note: See TracTickets for help on using tickets.