diff options
Diffstat (limited to 'framework/Web/Javascripts/extended/event.js')
-rw-r--r-- | framework/Web/Javascripts/extended/event.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/framework/Web/Javascripts/extended/event.js b/framework/Web/Javascripts/extended/event.js index 4fd041d8..e464fa94 100644 --- a/framework/Web/Javascripts/extended/event.js +++ b/framework/Web/Javascripts/extended/event.js @@ -82,10 +82,19 @@ Object.extend(Event, }
else if(Event.isMouseEvent(type))
{
- var event = document.createEvent('MouseEvents');
- event.initMouseEvent(type,true,true,
- document.defaultView, 1, 0, 0, 0, 0, false,
- false, false, false, 0, null);
+ var event = document.createEvent('MouseEvents');
+ if (event.initMouseEvent)
+ {
+ event.initMouseEvent(type,true,true,
+ document.defaultView, 1, 0, 0, 0, 0, false,
+ false, false, false, 0, null);
+ }
+ else
+ {
+ // Safari
+ // TODO we should be initialising other mouse-event related attributes here
+ event.initEvent(type, true, true);
+ }
}
element.dispatchEvent(event);
}
|