git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d9b1d34
)
Changed the window.location hack to be more specific (and documented).
author
John Resig
<jeresig@gmail.com>
Fri, 16 Jun 2006 00:18:15 +0000
(
00:18
+0000)
committer
John Resig
<jeresig@gmail.com>
Fri, 16 Jun 2006 00:18:15 +0000
(
00:18
+0000)
jquery/jquery.js
patch
|
blob
|
history
diff --git
a/jquery/jquery.js
b/jquery/jquery.js
index
3e7ffa6
..
7577936
100644
(file)
--- a/
jquery/jquery.js
+++ b/
jquery/jquery.js
@@
-778,7
+778,12
@@
$.event = {};
// Bind an event to an element
// Original by Dean Edwards
$.event.add = function(element, type, handler) {
// Bind an event to an element
// Original by Dean Edwards
$.event.add = function(element, type, handler) {
- if ( element.location ) { element = window; } // Ughhhhh....
+ // For whatever reason, IE has trouble passing the window object
+ // around, causing it to be cloned in the process
+ if ( $.browser == "msie" && typeof element.setInterval != "undefined" ) {
+ element = window;
+ }
+
if (!handler.$$guid) { handler.$$guid = $.event.add.guid++; }
if (!element.events) { element.events = {}; }
var handlers = element.events[type];
if (!handler.$$guid) { handler.$$guid = $.event.add.guid++; }
if (!element.events) { element.events = {}; }
var handlers = element.events[type];