git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix for #5198, event memory leak limited to IE only via conditional compilation
[jquery.git]
/
src
/
event.js
diff --git
a/src/event.js
b/src/event.js
index
8eaf44e
..
9d77314
100644
(file)
--- a/
src/event.js
+++ b/
src/event.js
@@
-57,7
+57,7
@@
jQuery.event = {
// Namespaced event handlers
var namespaces = type.split(".");
type = namespaces.shift();
// Namespaced event handlers
var namespaces = type.split(".");
type = namespaces.shift();
- handler.type = namespaces.slice().sort().join(".");
+ handler.type = namespaces.slice(0).sort().join(".");
// Get the current list of functions bound to this event
var handlers = events[ type ],
// Get the current list of functions bound to this event
var handlers = events[ type ],
@@
-133,7
+133,7
@@
jQuery.event = {
var namespaces = type.split(".");
type = namespaces.shift();
var all = !namespaces.length,
var namespaces = type.split(".");
type = namespaces.shift();
var all = !namespaces.length,
- namespace = new RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)"),
+ namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join(".*\\.") + "(\\.|$)"),
special = this.special[ type ] || {};
if ( events[ type ] ) {
special = this.special[ type ] || {};
if ( events[ type ] ) {
@@
-291,7
+291,7
@@
jQuery.event = {
// Cache this now, all = true means, any handler
all = !namespaces.length && !event.exclusive;
// Cache this now, all = true means, any handler
all = !namespaces.length && !event.exclusive;
- var namespace = new RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
+ var namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join(".*\\.") + "(\\.|$)");
handlers = ( jQuery.data(this, "events") || {} )[ event.type ];
handlers = ( jQuery.data(this, "events") || {} )[ event.type ];
@@
-776,11
+776,10
@@
jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
});
// Prevent memory leaks in IE
});
// Prevent memory leaks in IE
-// And prevent errors on refresh with events like mouseover in other browsers
// Window isn't included so as not to unbind existing unload events
// More info:
// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
// Window isn't included so as not to unbind existing unload events
// More info:
// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
-// - https://bugzilla.mozilla.org/show_bug.cgi?id=252542
+/*@cc_on
jQuery( window ).bind( 'unload', function() {
for ( var id in jQuery.cache ) {
// Skip the window
jQuery( window ).bind( 'unload', function() {
for ( var id in jQuery.cache ) {
// Skip the window
@@
-789,3
+788,4
@@
jQuery( window ).bind( 'unload', function() {
}
}
});
}
}
});
+@*/