X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fevent.js;h=e707015c10717c8e82a2206e3ed8a6e7a0e4d0ad;hb=9aa0c69c43bad9fce5ef7732692308afb2a38ec6;hp=08deb8b2985e13579a55be98e8097c2f68199576;hpb=b1018cad1256a7b9cc47e675b2a9e22c409b7aed;p=jquery.git diff --git a/src/event.js b/src/event.js index 08deb8b..e707015 100644 --- a/src/event.js +++ b/src/event.js @@ -377,13 +377,13 @@ jQuery.Event = function( src ){ if( src && src.type ){ this.originalEvent = src; this.type = src.type; - this.timeStamp = src.timeStamp; // Event type }else this.type = src; - if( !this.timeStamp ) - this.timeStamp = now(); + // timeStamp is buggy for some events on Firefox(#3843) + // So we won't rely on the native value + this.timeStamp = now(); // Mark it as fixed this[expando] = true; @@ -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 && !window.frameElement ) (function(){ + if ( document.documentElement.doScroll && window == window.top ) (function(){ if ( jQuery.isReady ) return; try {