Bug Tracker

Opened 10 years ago

Closed 8 years ago

#4499 closed bug (invalid)

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

Change History (3)

comment:1 Changed 8 years ago by Rick Waldron

Milestone: 1.41.4.5
Priority: majorlow
Status: newopen

comment:2 Changed 8 years ago by addyosmani

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

comment:3 Changed 8 years ago by timmywil

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.

Note: See TracTickets for help on using tickets.