Potential fix for .matches when using an attribute selector against attributes with no value#54
Potential fix for .matches when using an attribute selector against attributes with no value#54mmurray wants to merge 3 commits intojquery:masterfrom
Conversation
…nce of an attr, so as long as the result is not null or undefined we should return true
|
John already fixed this issue: https://github.com/jeresig/sizzle/commit/f12b9309269ba7e705a99efe099f86ed1fe98d58 |
|
Ah, I should have pulled first, heh. Thanks! |
|
Are you sure it's the same bug? I mistakenly said matchesSelector at first, but it's actually an issue with SIzzle.matches. After making sure I'm up-to-date on master the first test in this pull request still fails, and it is fixed by my change. |
|
Hmm, I thought it was. Maybe I was wrong. |
|
I was working on a jQuery bug related to 7770 and noticed that it was fixed. That was http://bugs.jquery.com/ticket/7369 |
|
I'm starting to think this pull might fix several jQuery selector bugs. We should take a close look at this soon. |
|
Sorry I have been busy and haven't had a chance to look at those yet. I will try to take a look this week. |
|
I don't this is necessary anymore. |
Sizzle.matchesfails to match based on an attribute selector when the attribute has no value.I discovered this bug in Sizzle while investigating jQuery bug #7770, this pull request contains my proposed fix and some regression tests.
Basically, if there is no operator type then I assume we are just checking for existence of the attribute. So as long as the value of result is not null or undefined then we should have a match.