$().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()
Change History (5)
comment:2 Changed 6 years ago by snover
- Milestone 1.4.3 deleted
- Priority set to low
- Status changed from new to open
- Version changed from 1.4.2 to 1.4.3
comment:3 Changed 5 years ago by john
- Milestone set to 1.6
- Owner set to john
- Status changed from open to assigned
comment:4 Changed 5 years ago by John Resig
- Resolution set to fixed
- Status changed from assigned to closed