Bug Tracker

Modify

Ticket #4328 (closed bug: invalid)

Opened 4 years ago

Last modified 4 years ago

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

comment:1 Changed 4 years ago by davidserduke

  • Description modified (diff)

comment:2 Changed 4 years ago by davidserduke

  • Status changed from new to closed
  • Resolution set to invalid

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.