mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Made jQuery's internal trigger method return the value from handle. (Bug #1417)
This commit is contained in:
parent
25e83d27cb
commit
15faf783b9
@ -142,9 +142,12 @@ 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 ]();
|
||||
@ -152,6 +155,8 @@ jQuery.event = {
|
||||
|
||||
this.triggered = false;
|
||||
}
|
||||
|
||||
return val;
|
||||
},
|
||||
|
||||
handle: function(event) {
|
||||
|
Loading…
Reference in New Issue
Block a user