Ticket #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: | |
| Blocking: | Blocked by: |
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
comment:1 Changed 4 years ago by john
- Status changed from new to closed
- Resolution set to worksforme
- Component changed from unfilled to selector
comment:2 Changed 4 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?
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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!