Bug Tracker

Opened 11 years ago

Closed 10 years ago

#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:
Blocked by: Blocking:

Description (last modified by davidserduke)

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 (2)

comment:1 Changed 10 years ago by davidserduke

Description: modified (diff)

comment:2 Changed 10 years ago by davidserduke

Resolution: invalid
Status: newclosed

Looks like this was a Chrome bug. Tried it in 3.0.195.27 (which Google says is the up-to-date version) and it returned 2.

Note: See TracTickets for help on using tickets.