git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
jquery event: closes #4033. e.currentTarget wasn't being enforced for native events...
[jquery.git]
/
src
/
event.js
diff --git
a/src/event.js
b/src/event.js
index
5ae4bad
..
a50fe89
100644
(file)
--- a/
src/event.js
+++ b/
src/event.js
@@
-240,7
+240,8
@@
jQuery.event = {
var all, handlers;
event = arguments[0] = jQuery.event.fix( event || window.event );
var all, handlers;
event = arguments[0] = jQuery.event.fix( event || window.event );
-
+ event.currentTarget = this;
+
// Namespaced event handlers
var namespaces = event.type.split(".");
event.type = namespaces.shift();
// Namespaced event handlers
var namespaces = event.type.split(".");
event.type = namespaces.shift();
@@
-571,10
+572,13
@@
function liveHandler( event ){
}
});
}
});
+ elems.sort(function(a,b) {
+ return jQuery.data(a.elem, "closest") - jQuery.data(b.elem, "closest");
+ });
+
jQuery.each(elems, function(){
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;
});
return stop;
@@
-638,7
+642,7
@@
function bindReady(){
// If IE and not an iframe
// continually check to see if the document is ready
// 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 {
if ( jQuery.isReady ) return;
try {