Bug Tracker

Modify

Ticket #8350 (closed bug: invalid)

Opened 2 years ago

Last modified 15 months ago

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:
Blocking: Blocked by:

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

comment:1 Changed 2 years ago by jitter

  • Priority changed from undecided to low
  • Resolution set to invalid
  • Status changed from new to closed
  • Component changed from unfiled to css

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 2 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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.