summaryrefslogtreecommitdiff
path: root/program/js/common.js
diff options
context:
space:
mode:
authortill <till@php.net>2008-02-13 05:33:41 +0000
committertill <till@php.net>2008-02-13 05:33:41 +0000
commita265ab1a29178ebc879970984d9ba96550503961 (patch)
tree362fa22e4ded132d976572bbdcbd4cba0879015f /program/js/common.js
parent2912dbd2c22220d657e5d5d9935f91c09b1103a4 (diff)
* implementing patch from #1484605
Diffstat (limited to 'program/js/common.js')
-rw-r--r--program/js/common.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/program/js/common.js b/program/js/common.js
index 860ca3e07..1701d3820 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -171,7 +171,12 @@ add_listener: function(p)
if (p.element.addEventListener)
p.element.addEventListener(p.event, p.object._rc_events[key], false);
else if (p.element.attachEvent)
+ {
+ // IE allows multiple events with the same function to be applied to the same object
+ // forcibly detach the event, then attach
+ p.element.detachEvent('on'+p.event, p.object._rc_events[key]);
p.element.attachEvent('on'+p.event, p.object._rc_events[key]);
+ }
else
p.element['on'+p.event] = p.object._rc_events[key];
},