diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2011-08-17 10:34:13 -0400 |
---|---|---|
committer | timmywil <timmywillisn@gmail.com> | 2011-09-19 15:42:31 -0400 |
commit | 68d07bf648c55c39aeb5b3abc634c58087b19fd8 (patch) | |
tree | fcecc09294759a26e8458a4a739405a3fd0e3ed9 | |
parent | 66e9a6f77365fb4f682164cf1df5283fccf322d1 (diff) | |
download | jquery-68d07bf648c55c39aeb5b3abc634c58087b19fd8.tar.gz jquery-68d07bf648c55c39aeb5b3abc634c58087b19fd8.zip |
Clean up the delegate matching logic.
-rw-r--r-- | src/event.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/event.js b/src/event.js index dd2a817fa..e6382ea62 100644 --- a/src/event.js +++ b/src/event.js @@ -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 ); |