Skip to main content

Bug Tracker

Side navigation

#10843 closed feature (duplicate)

Opened November 21, 2011 01:55PM UTC

Closed July 03, 2012 02:30AM UTC

Consider adding :link to Sizzle

Reported by: Christopher Lenz <cmlenz@gmail.com> Owned by: Christopher Lenz <cmlenz@gmail.com>
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.

Attachments (0)
Change History (8)

Changed November 21, 2011 08:56PM UTC by timmywil comment:1

component: unfiledselector
milestone: None1.7.2
owner: → 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/

Changed March 12, 2012 03:09PM UTC by timmywil comment:2

milestone: 1.7.21.8

Pushing to 1.8 sizzle rewrite.

Changed May 18, 2012 01:06AM UTC by dmethvin comment:3

owner: timmywilChristopher Lenz <cmlenz@gmail.com>
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.

Changed May 23, 2012 01:05PM UTC by Christopher Lenz <cmlenz@gmail.com> comment:4

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?

Changed May 29, 2012 12:18AM UTC by timmywil comment:5

status: newopen
type: bugfeature

We should consider adding the :link selector

Changed June 04, 2012 06:16PM UTC by dmethvin comment:6

milestone: 1.81.next

Changed June 04, 2012 06:16PM UTC by dmethvin comment:7

keywords: → ie6 ie7
summary: Has-Attribute-Selector doesn't work correctly with IE6&7Consider adding :link to Sizzle

Changed July 03, 2012 02:30AM UTC by timmywil comment:8

resolution: → duplicate
status: openclosed

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