Skip to content
Permalink
Browse files

Made jQuery's internal trigger method return the value from handle. (…

…Bug #1417)
  • Loading branch information
jeresig committed Aug 28, 2007
1 parent 25e83d2 commit 15faf783b9c3c454868b5054fdcfb63e8950abf9
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/event/event.js
@@ -142,16 +142,21 @@ jQuery.event = {
// Trigger the event
if ( jQuery.isFunction( element.$handle ) )
val = element.$handle.apply( element, data );

// Handle triggering native .onfoo handlers
if ( !fn && element["on"+type] && element["on"+type].apply( element, data ) === false )
val = false;

// Trigger the native events (except for clicks on links)
if ( fn && val !== false && !(jQuery.nodeName(element, 'a') && type == "click") ) {
this.triggered = true;
element[ type ]();
}

this.triggered = false;
}

return val;
},

handle: function(event) {

0 comments on commit 15faf78

Please sign in to comment.
You can’t perform that action at this time.