Bug Tracker

Custom Query (13852 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (4 - 6 of 13852)

1 2 3 4 5 6 7 8 9 10 11 12
Ticket Resolution Summary Owner Reporter
#4023 fixed "+" combinator and ":visible" misbehaving? john jsycamore
Description

In the following sample code, the result should be that only "section 3" has a yellow background, red border & blue text. But for IE and Firefox that's not the case. Chrome gets the "+" right, but overselects with the ":visible".

<html> <head> <script type='text/javascript' src="jquery.js"></script> <script type='text/javascript'>

$(function(){

$("div.t+div").css("background","yellow"); $("div.t").find("+div").css("border", "1pt solid red"); $("div.t+div:visible").css("color","blue");

});

</script> </head> <body>

<div>First section</div> <div class=t>Second section</div> <div>Third section</div>

</body>

#4028 wontfix ".className:not(:first)." incorrect in IE john bryfox
Description
  1. The selector '$(".className:not(:first)").length)' returns one too many elements in IE.
  1. The selector '$("div.className:not(:first)").length)' returns one too many elements in IE if the className divs are inside a containing div.

Tested in IE6 and IE7 under windows XP, jQuery 1.3.1. (No problem with 1.2.6.)

Example markup:

<div>
  <div class="className"></div>
  <div class="className"></div>
</div>
<script>
$("div.className:not(:first)").length); // == 2 in IE
$(".className:not(:first)").length); // == 2 in IE
</script>
#11115 fixed ".is()" and ".filter()" disagree on attribute selector "[checked]" gibson042 Pointy
Description

The selector "[checked]" is treated differently by ".is()" and ".filter()", in a strange and mysterious way when the "checked" property (not attribute) is set; that is, on checkbox inputs that in the DOM lack the "checked" attribute but which have been checked by user action (or possibly by explicit setting of the "checked" property). If you've got a jQuery object matching one DOM node (and just one), then ".is()" and ".filter()" are in agreement. That is, if a checkbox is checked only after the DOM is built, then both ".is()" and ".filter()" agree that the selector "[checked]" should not match the node.

However, when the jQuery object selects more than one checkbox, then the behavior of ".filter()" changes. Though each checkbox, if tested individually with ".is('[checked]')" would appear to not match, a call to ".filter('checked')" will nevertheless include them in the result if they've been dynamically updated.

Here is a jsfiddle to explore the issue: http://jsfiddle.net/mgfxe/2/

Now I realize that "[checked]" is not really correct or useful or anything, but the behavior does seem inconsistent; I would imagine that any node that makes it through a selector-based ".filter()" should be guaranteed to pass a ".is()" test for the same selector. The funny thing is that the implementation boils down to calls to "Sizzle.matches()" or "Sizzle.matchesSelector()" (I think) and both of those are nearly identical.

1 2 3 4 5 6 7 8 9 10 11 12
Note: See TracQuery for help on using queries.