Skip to content
Permalink
Browse files

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)
  • Loading branch information
jeresig committed Aug 28, 2007
1 parent 127c0b8 commit 25e83d27cb20ba8aa5dec7fec2d05e4da52d9fee
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/event/event.js
@@ -170,10 +170,14 @@ jQuery.event = {
args[0].handler = c[j];
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.stopPropagation();
val = false;
}
}

0 comments on commit 25e83d2

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