Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#3910 closed bug (worksforme)

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.

Change History (3)

comment:1 Changed 11 years ago by john

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!

comment:2 Changed 11 years ago by smunz

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?

comment:3 Changed 11 years ago by vnesek

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

Thanks smunz

Note: See TracTickets for help on using tickets.