Skip to main content

Bug Tracker

Side navigation

#4499 closed bug (invalid)

Opened April 06, 2009 05:58PM UTC

Closed July 11, 2011 06:59PM UTC

Not working attribute selectors in Chrome 2.0.169.1

Reported by: oluckyman Owned by: john
Priority: low Milestone: 1.next
Component: selector Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

test HTML:

<html>

<body>

<a href="/test/url#test_hash" id="testa">test A</a>

<!-- including javascripts here -->

</body>

</html>

test javascript:

$(document).ready(init);

function init()

{

alert([

$('a[hash]').length,

$('a[hash="#test_hash"]').length,

$('a[hash=#test_hash]').length

])

}

in Chrome 2.0.169.1 displays: 0,0,1

in other browsers: 1,1,1

Attachments (0)
Change History (3)

Changed October 27, 2010 01:45AM UTC by rwaldron comment:1

milestone: 1.41.4.5
priority: majorlow
status: newopen

Changed July 11, 2011 05:02PM UTC by addyosmani comment:2

Reconfirming rwaldron's test case is still failing in Chrome 12 for me.

Changed July 11, 2011 06:59PM UTC by timmywil comment:3

resolution: → invalid
status: openclosed

There are couple things off here. First, hash is a property and cannot be used in an attribute selector, so the correct result is 0,0,0. Second, you'll get 0,0,0 if #test_hash in the third selector is correctly quoted as is required in jQuery attribute selectors. Closing invalid.