Ticket #6912 (closed bug: fixed)
$().add(selectElement) adds option children instead
|Reported by:||ratbeard||Owned by:||john|
Passing a raw dom select element to jQuery.fn.add adds all of its option children to the collection, instead of the select element itself.
Array.prototype.slice.call() inside makeArray gets confused probably due to the select element having a length property.
Tested this in Chrome 5 and FF 3.6 on osx 10.6.
Workaround is to wrap the select element in jQuery()
- Priority set to low
- Status changed from new to open
- Version changed from 1.4.2 to 1.4.3
- Milestone 1.4.3 deleted
- Owner set to john
- Status changed from open to assigned
- Milestone set to 1.6
- Status changed from assigned to closed
- Resolution set to fixed