Ticket #4328 (closed bug: invalid)
Google Chrome Bug in Form Selectors
| Reported by: | mckamey | Owned by: | john |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4 |
| Component: | selector | Version: | 1.3.2 |
| Keywords: | Google Chrome, Chrome | Cc: | |
| Blocking: | Blocked by: |
Description (last modified by davidserduke) (diff)
http://groups.google.com/group/jquery-dev/browse_thread/thread/2d7f7cf231aeff29
I've managed to factor out all of "my code" and all that is left is this tiny little snippet which dies only on Google Chrome.
// jQuery 1.3.2
// Google Chrome v1.0.154.48
$(function() {
try {
var bugForm = $("<form><input /><input /></form>")[0];
var bugExpr = $("textarea,input", bugForm);
alert("Success! found "+bugExpr.length+" items");
} catch(ex) {
alert(ex);
}
});
It appears to die with a cryptic DOM Range exception just as it enters the Array.sort method. Changing the selector from "textarea,input" to ["textarea","input"] appears to fix it.
I suspect that it may be a Chrome bug (which I've reported to them as well) but jQuery might want to implement a workaround as the experience is very confusing.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
