Bug Tracker

Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#9570 closed bug (fixed)

Selector $('form[name=".."]') returns zero elements in IE8 under some conditions

Reported by: Trial Owned by: timmywil
Priority: low Milestone: 1.7
Component: selector Version: 1.6.1
Keywords: sizzle attributes Cc:
Blocked by: Blocking:


Selector $('form[name=".."]') returns zero elements in IE8 if form has <input name="name">

<form name="form1"> <input type="text" name="name"> </form>


alert($('form[name="form1"]').length); 0 in IE8, 1 in Mozilla


Change History (6)

comment:1 Changed 8 years ago by timmywil

Component: unfiledselector
Keywords: sizzle attributes added
Milestone: 1.next1.7
Priority: undecidedlow
Status: newopen

When sizzle uses jQuery's attr logic, this won't be a problem.

comment:2 Changed 8 years ago by dmethvin

Also it is risky to use attribute names that match other attribute/property names, like id, target, action, name, per DomLint:


comment:3 Changed 8 years ago by john

Owner: set to timmywil
Status: openassigned

comment:4 Changed 8 years ago by john

Seems to be a regression of #7212.

comment:5 Changed 8 years ago by timmywil

@john: It is? I think this is a problem for all versions of jQuery. Correct me if I'm wrong.

comment:6 Changed 7 years ago by timmywil

Resolution: fixed
Status: assignedclosed

Override Sizzle attribute retrieval with jQuery.attr. Fixes #5637, #7128, #9261, #9570, #10178.

Bug fixed on the side: $(window).is('a') was throwing an exception. Fixes #10178.

Changeset: 92405d4f5ffe9ec1f26f280303783014948438c5

Note: See TracTickets for help on using tickets.