Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 9eb56c67296192fc05a1d919efcdca81930a0a26 1 parent 70b402e
@ibolmo ibolmo authored arian committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 Source/Element/Element.js
View
6 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;
Please sign in to comment.
Something went wrong with that request. Please try again.