Fixed regression with 5276 where return false in first handler of multiple handlers was ignored. And 5276 log message says 200% but I meant 20%.
This commit is contained in:
parent
291f071eff
commit
2efd0b4cc5
1 changed files with 10 additions and 7 deletions
13
src/event.js
13
src/event.js
|
@ -231,7 +231,7 @@ jQuery.event = {
|
||||||
|
|
||||||
handle: function(event) {
|
handle: function(event) {
|
||||||
// returned undefined or false
|
// returned undefined or false
|
||||||
var val, namespace, all, handlers;
|
var val, ret, namespace, all, handlers;
|
||||||
|
|
||||||
event = arguments[0] = jQuery.event.fix( event || window.event );
|
event = arguments[0] = jQuery.event.fix( event || window.event );
|
||||||
|
|
||||||
|
@ -253,14 +253,17 @@ jQuery.event = {
|
||||||
event.handler = handler;
|
event.handler = handler;
|
||||||
event.data = handler.data;
|
event.data = handler.data;
|
||||||
|
|
||||||
val = handler.apply( this, arguments );
|
ret = handler.apply( this, arguments );
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( val === false ) {
|
if ( val !== false )
|
||||||
|
val = ret;
|
||||||
|
|
||||||
|
if ( ret === false ) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Clean up added properties in IE to prevent memory leak
|
// Clean up added properties in IE to prevent memory leak
|
||||||
if (jQuery.browser.msie)
|
if (jQuery.browser.msie)
|
||||||
|
|
Loading…
Reference in a new issue