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 comment:1
milestone: | 1.4 → 1.4.5 |
---|---|
priority: | major → low |
status: | new → open |
Changed July 11, 2011 05:02PM UTC by comment:2
Reconfirming rwaldron's test case is still failing in Chrome 12 for me.
Changed July 11, 2011 06:59PM UTC by comment:3
resolution: | → invalid |
---|---|
status: | open → closed |
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.
Confirmed;
http://jsfiddle.net/rwaldron/mrVQ4/2/