git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Focused support of .live(). stopPropagation and stopImmediatePropagation are not...
[jquery.git]
/
src
/
event.js
diff --git
a/src/event.js
b/src/event.js
index
1ba0357
..
fdf61ba
100644
(file)
--- 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;
if( src && src.type ){
this.originalEvent = src;
this.type = src.type;
- this.timeStamp = src.timeStamp;
// Event type
}else
this.type = src;
// 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;
// Mark it as fixed
this[expando] = true;
@@
-560,15
+560,22
@@
jQuery.fn.extend({
function liveHandler( event ){
var check = RegExp("(^|\\.)" + event.type + "(\\.|$)"),
function liveHandler( event ){
var check = RegExp("(^|\\.)" + event.type + "(\\.|$)"),
- stop = true;
+ stop = true,
+ elems = [];
jQuery.each(jQuery.data(this, "events").live || [], function(i, fn){
jQuery.each(jQuery.data(this, "events").live || [], function(i, fn){
- if ( !event.isImmediatePropagationStopped() && check.test(fn.type) ) {
+ if ( check.test(fn.type) ) {
var elem = jQuery(event.target).closest(fn.data)[0];
var elem = jQuery(event.target).closest(fn.data)[0];
- if ( elem && fn.call(elem, event, fn.data) === false )
- stop = false;
+ if ( elem )
+ elems.push({ elem: elem, fn: fn });
}
});
}
});
+
+ jQuery.each(elems, function(){
+ if ( this.fn.call(this.elem, event, this.fn.data) === false )
+ stop = false;
+ });
+
return stop;
}
return stop;
}
@@
-630,7
+637,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 && !window.frameElement ) (function(){
+ if ( document.documentElement.doScroll && typeof window.frameElement === "undefined" ) (function(){
if ( jQuery.isReady ) return;
try {
if ( jQuery.isReady ) return;
try {