Bug Tracker

Opened 8 years ago

Closed 7 years ago

#10843 closed feature (duplicate)

Consider adding :link to Sizzle

Reported by: Christopher Lenz <cmlenz@…> Owned by: Christopher Lenz <cmlenz@…>
Priority: low Milestone: 1.next
Component: selector Version: 1.7.1rc1
Keywords: ie6 ie7 Cc:
Blocked by: Blocking:

Description

Using selectors of the type [attrname] to select elements based on the existence of an attribute seems to have broken in IE6 and IE7 with jQuery 1.7. The results include elements even without the attribute.

I've created a fiddle to show the problem:
http://jsfiddle.net/wuRsG/5/

This fails for IE6 and IE7 with jQuery 1.7, but works as expected with jQuery 1.6.4 and earlier versions.

Change History (8)

comment:1 Changed 8 years ago by timmywil

Component: unfiledselector
Milestone: None1.7.2
Owner: set to timmywil
Priority: undecidedlow
Status: newassigned

It's strange that this doesn't seem to be working the same way in 1.7. We'll look into this for 1.7.2. http://jsfiddle.net/timmywil/wuRsG/11/

comment:2 Changed 8 years ago by timmywil

Milestone: 1.7.21.8

Pushing to 1.8 sizzle rewrite.

comment:3 Changed 8 years ago by dmethvin

Owner: changed from timmywil to Christopher Lenz <cmlenz@…>
Status: assignedpending

What is the use case for this? We're inclined to close it wontfix but would like to hear if there are really useful cases we're missing.

comment:4 Changed 8 years ago by Christopher Lenz <cmlenz@…>

Status: pendingnew

I am using the type of selector primarily for selecting <a> elements that have href attributes, similar to using :link vs. just a in CSS selectors.

Can you suggest an alternative selector for this, or would I need to add markup?

comment:5 Changed 8 years ago by timmywil

Status: newopen
Type: bugfeature

We should consider adding the :link selector

comment:6 Changed 8 years ago by dmethvin

Milestone: 1.81.next

comment:7 Changed 8 years ago by dmethvin

Keywords: ie6 ie7 added
Summary: Has-Attribute-Selector doesn't work correctly with IE6&7Consider adding :link to Sizzle

comment:8 Changed 7 years ago by timmywil

Resolution: duplicate
Status: openclosed

This has been ported to a more widespread Sizzle issue: https://github.com/jquery/sizzle/issues/44

Note: See TracTickets for help on using tickets.