]> source.dussan.org Git - jquery.git/commitdiff
Clean up the delegate matching logic.
authorDave Methvin <dave.methvin@gmail.com>
Wed, 17 Aug 2011 14:34:13 +0000 (10:34 -0400)
committertimmywil <timmywillisn@gmail.com>
Mon, 19 Sep 2011 19:42:31 +0000 (15:42 -0400)
src/event.js

index dd2a817faf330b0e275e10778b8ee0f5b1100d20..e6382ea62aa2d8c754a8201161d6b6c5d2610fb6 100644 (file)
@@ -437,8 +437,8 @@ jQuery.event = {
                                        if ( handleObj.isPositional ) {
                                                // Since .is() does not work for positionals; see http://jsfiddle.net/eJ4yd/3/
                                                hit = (hit || (selMatch[ sel ] = jQuery( sel ))).index( cur ) >= 0;
-                                       } else {
-                                               hit = hit || hit !== false && (selMatch[ sel ] = (handleObj.quick? quickIs( cur, handleObj.quick ) : jQuery( cur ).is( sel )));
+                                       } else if ( hit === undefined ) {
+                                               hit = selMatch[ sel ] = (handleObj.quick? quickIs( cur, handleObj.quick ) : jQuery( cur ).is( sel ));
                                        }
                                        if ( hit ) {
                                                matches.push( handleObj );