Permalink
Browse files

Fixes #2163.

IE7 seems to have issues with assigning native functions as properties.
Fix is to wrap the native function with an anon. func..

PASSED: IE6-9; FFx 3-5, 8, 10; Chrome latest; Safari 5; Opera 11
  • Loading branch information...
ibolmo authored and arian committed Jan 9, 2012
1 parent 70b402e commit 9eb56c67296192fc05a1d919efcdca81930a0a26
Showing with 5 additions and 1 deletion.
  1. +5 −1 Source/Element/Element.js
@@ -262,7 +262,11 @@ Document.implement({
element: function(el, nocash){
Slick.uidOf(el);
if (!nocash && !el.$family && !(/^(?:object|embed)$/i).test(el.tagName)){
- el._fireEvent = el.fireEvent;
+ var fireEvent = el.fireEvent;
+ // wrapping needed in IE7, or else crash
+ el._fireEvent = function(type, event){
+ return fireEvent(type, event);
+ };
Object.append(el, Element.Prototype);
}
return el;

0 comments on commit 9eb56c6

Please sign in to comment.