Skip to main content

Bug Tracker

Side navigation

#3910 closed bug (worksforme)

Opened January 19, 2009 09:25AM UTC

Closed January 20, 2009 11:10PM UTC

Last modified January 30, 2009 09:29AM UTC

Incorrect selection when searching form elements

Reported by: vnesek Owned by:
Priority: major Milestone: 1.3.1
Component: selector Version: 1.3
Keywords: select Cc:
Blocked by: Blocking:
Description

When selecting on a form containing 'select' elements,

i.e:

<form>

<input class='v' />

<select class='v'>

<option>1</option>

<option>2</option>

<option>3</option>

</select>

</form>

with $('form .v'), $('form select | form input') and similar return all option elements and don't return select element. Option elements shouldn't be returned. This is a regression since 1.2.6.

Attachments (0)
Change History (3)

Changed January 20, 2009 11:10PM UTC by john comment:1

component: unfilledselector
resolution: → worksforme
status: newclosed

I can't duplicate this. Please make sure that you're using a non-packed version of jQuery. My copy of your test case:

http://ejohn.org/files/jquery1.3/select2.html

Please let me know if you're able to get this to fail again, and if so, please re-open this ticket - thanks!

Changed January 21, 2009 02:11PM UTC by smunz comment:2

I had the same issues with $('form select') returning the option-Tags. (+ $('form') returning the same as $('form :input').

The cause was an old version of the jquery.validate-Plugin (1.3), which overwrites the jQuery.fn.push-Function. After renaming this function, disabling the plugin or later ugrading it to version 1.5.1 (which was released for compatibility with jquery 1.3) these failures were all gone.

@vnesek: Maybe you could check your plugins and their versions?

Changed January 30, 2009 09:29AM UTC by vnesek comment:3

Yes, that was the problem... I has validate plugin version 1.5.

Thanks smunz