X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fevent.js;h=e707015c10717c8e82a2206e3ed8a6e7a0e4d0ad;hb=048fc4555f8a794239a985c63cff3f76d20d6c61;hp=5ae4badc7678d0451f40f12117a23e2459d12813;hpb=735d44f6df67767bc04a0f135ffad0369f71a26f;p=jquery.git diff --git a/src/event.js b/src/event.js index 5ae4bad..e707015 100644 --- a/src/event.js +++ b/src/event.js @@ -571,10 +571,13 @@ function liveHandler( event ){ } }); + elems.sort(function(a,b) { + return jQuery.data(a.elem, "closest") - jQuery.data(b.elem, "closest"); + }); + jQuery.each(elems, function(){ - if ( !event.isImmediatePropagationStopped() && - this.fn.call(this.elem, event, this.fn.data) === false ) - stop = false; + if ( this.fn.call(this.elem, event, this.fn.data) === false ) + return (stop = false); }); return stop; @@ -638,7 +641,7 @@ function bindReady(){ // If IE and not an iframe // continually check to see if the document is ready - if ( document.documentElement.doScroll && typeof window.frameElement === "undefined" ) (function(){ + if ( document.documentElement.doScroll && window == window.top ) (function(){ if ( jQuery.isReady ) return; try {