mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Made it so that the last return value is always returned from handle() (unless one of the return values was false, in which case the return value is false). (Bug #1416)
This commit is contained in:
parent
127c0b8a5d
commit
25e83d27cb
@ -170,10 +170,14 @@ jQuery.event = {
|
|||||||
args[0].handler = c[j];
|
args[0].handler = c[j];
|
||||||
args[0].data = c[j].data;
|
args[0].data = c[j].data;
|
||||||
|
|
||||||
if ( c[j].apply( this, args ) === false ) {
|
var tmp = c[j].apply( this, args );
|
||||||
|
|
||||||
|
if ( val !== false )
|
||||||
|
val = tmp;
|
||||||
|
|
||||||
|
if ( tmp === false ) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
val = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user