Side navigation
#7770 closed bug (duplicate)
Opened December 14, 2010 02:01AM UTC
Closed July 12, 2011 04:18PM UTC
Last modified July 12, 2011 04:18PM UTC
$('[attr]') returns nothing if attr is present but has no value in IE
Reported by: | jcattley@gmail.com | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 1.next |
Component: | selector | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
<table data-foo data-bar='bat'>
<tr>
<td id='test'></td>
</tr>
</table>
console.log($('[data-foo]'));
console.log($('#test').parents('[data-foo]'));
console.log($('#test').parents('[data-bar]'));
returns
[<table>...]
[]
[<table>...]
Attachments (0)
Change History (12)
Changed December 14, 2010 06:22AM UTC by comment:1
blockedby: | → 5637 |
---|---|
component: | unfiled → selector |
priority: | undecided → high |
status: | new → open |
Changed March 26, 2011 03:30AM UTC by comment:2
_comment0: | I think this is actually a bug with Sizzle.matchesSelector, see my pull request here: https://github.com/jeresig/sizzle/pull/54 \ \ I also opened a pull request with some regression tests for jQuery: https://github.com/jquery/jquery/pull/288 → 1301111961348424 |
---|
I think this is actually a bug with Sizzle.matches, see my pull request here: https://github.com/jeresig/sizzle/pull/54
I also opened a pull request with some regression tests for jQuery: https://github.com/jquery/jquery/pull/288
Changed March 26, 2011 04:00AM UTC by comment:3
This is a duplicate of http://bugs.jquery.com/ticket/7369 and has been fixed in the recent changes to sizzle.
Changed March 28, 2011 09:35PM UTC by comment:4
I'm not sure this is a dupe of that bug, and my regression tests still fail in the most recent version of Sizzle.
Also, it looks like the Sizzle repo just moved so my pull request is now here: https://github.com/jquery/sizzle/pull/54
Changed March 28, 2011 09:46PM UTC by comment:5
No it's not. Sorry, I didn't update my comment.
Changed April 10, 2011 07:51PM UTC by comment:6
I closed [pull 288](https://github.com/jquery/jquery/pull/288) from murz to clear out clutter but please include them in the patch if they are useful.
Changed April 17, 2011 08:39PM UTC by comment:7
milestone: | 1.6 → 1.next |
---|
Changed May 07, 2011 02:22AM UTC by comment:8
summary: | parents('[attr]') returns nothing if attr is present but has no value → $('[attr]') returns nothing if attr is present but has no value |
---|
Changed May 07, 2011 02:24AM UTC by comment:9
summary: | $('[attr]') returns nothing if attr is present but has no value → $('[attr]') returns nothing if attr is present but has no value in IE |
---|
A selector with an attribute with no value seems to be the heart of multiple selector bugs.
Changed May 07, 2011 02:24AM UTC by comment:10
#9159 is a duplicate of this ticket.
Changed July 12, 2011 04:18PM UTC by comment:11
resolution: | → duplicate |
---|---|
status: | open → closed |
Changed July 12, 2011 04:18PM UTC by comment:12
Duplicate of #5637.