jquery event: event.stopImmediatePropagation() stops live handlers as well.
authorAriel Flesler <aflesler@gmail.com>
Sun, 4 Jan 2009 22:32:18 +0000 (22:32 +0000)
committerAriel Flesler <aflesler@gmail.com>
Sun, 4 Jan 2009 22:32:18 +0000 (22:32 +0000)
src/event.js

index e90ef07..f1cdfc9 100644 (file)
@@ -563,7 +563,7 @@ function liveHandler( event ){
                stop = true;
 
        jQuery.each(jQuery.data(this, "events").live || [], function(i, fn){
-               if ( check.test(fn.type) ) {
+               if ( !event.isImmediatePropagationStopped() && check.test(fn.type) ) {
                        var elem = jQuery(event.target).closest(fn.data)[0];
                        if ( elem && fn.call(elem, event, fn.data) === false )
                                stop = false;