From: Ariel Flesler Date: Mon, 5 Jan 2009 13:31:21 +0000 (+0000) Subject: jquery event: Removed a needless if (old code) X-Git-Tag: 1.3b2~14 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=42c99472cc5718d90a129f6ebb10ea45d5816418;p=jquery.git jquery event: Removed a needless if (old code) --- diff --git a/src/event.js b/src/event.js index 54705d10a..50973024f 100644 --- a/src/event.js +++ b/src/event.js @@ -163,7 +163,8 @@ jQuery.event = { } }, - trigger: function( event, data, elem, bubbling /* internal */ ) { + // bubbling is internal + trigger: function( event, data, elem, bubbling ) { // Event object or event type var type = event.type || event; @@ -199,16 +200,13 @@ jQuery.event = { if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 ) return undefined; - // AT_TARGET phase (not bubbling) - if( !bubbling ){ - // Clean up in case it is reused - event.result = undefined; - event.target = elem; - - // Clone the incoming data, if any - data = jQuery.makeArray(data); - data.unshift( event ); - } + // Clean up in case it is reused + event.result = undefined; + event.target = elem; + + // Clone the incoming data, if any + data = jQuery.makeArray(data); + data.unshift( event ); } event.currentTarget = elem;