Skip to content
Permalink
Browse files

Fixed regression with 5276 where return false in first handler of mul…

…tiple handlers was ignored. And 5276 log message says 200% but I meant 20%.
  • Loading branch information
brandonaaron committed Apr 23, 2008
1 parent 291f071 commit 2efd0b4cc5cce9b22cd4bc638e25cc998736b6e7
Showing with 10 additions and 7 deletions.
  1. +10 −7 src/event.js
@@ -231,7 +231,7 @@ jQuery.event = {

handle: function(event) {
// returned undefined or false
var val, namespace, all, handlers;
var val, ret, namespace, all, handlers;

event = arguments[0] = jQuery.event.fix( event || window.event );

@@ -253,14 +253,17 @@ jQuery.event = {
event.handler = handler;
event.data = handler.data;

val = handler.apply( this, arguments );
ret = handler.apply( this, arguments );

if ( val !== false )
val = ret;

if ( ret === false ) {
event.preventDefault();
event.stopPropagation();
}
}
}

if ( val === false ) {
event.preventDefault();
event.stopPropagation();
}

// Clean up added properties in IE to prevent memory leak
if (jQuery.browser.msie)

0 comments on commit 2efd0b4

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