Skip to main content

Bug Tracker

Side navigation

#8486 closed bug (invalid)

Opened March 09, 2011 04:09PM UTC

Closed April 22, 2011 01:44AM UTC

find not working on a select in 1.5.1

Reported by: Jason Stone <> Owned by:
Priority: blocker Milestone:
Component: selector Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:


I have this piece of code -

x = $('#country_select').find('option[text=Ireland]');

which finds the option for Ireland in the select with id 'country_select'.

It works in v1.3 and in 1.4.1, however does not work in 1.5.1



Attachments (0)
Change History (3)

Changed March 09, 2011 06:37PM UTC by rwaldron comment:1

component: unfiledselector
keywords: → needsreview
priority: undecidedblocker
status: newopen




I added quotes to the attr value to make sure it was in compliance with the selector requirement.

Changed April 17, 2011 09:39PM UTC by timmywil comment:2

We have :contains for this. Is it valid to check text as an attribute?

Changed April 22, 2011 01:44AM UTC by dmethvin comment:3

keywords: needsreview
resolution: → invalid
status: openclosed

This is another property-vs-attribute conflict. The new behavior is correct and consistent, since there is no text *attribute* on the option element. Use the :contains() pseudo.