summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/extended
diff options
context:
space:
mode:
authorwei <>2006-09-02 04:02:56 +0000
committerwei <>2006-09-02 04:02:56 +0000
commit32feb309dc59ca50757431d627db7437c0e29073 (patch)
treeb31ef25e9e33a1a3cd63051fa8bdd39deab717cc /framework/Web/Javascripts/extended
parent815c7462bbc4848939aa53cf375a0269d51b81fa (diff)
Fixed #211
Diffstat (limited to 'framework/Web/Javascripts/extended')
-rw-r--r--framework/Web/Javascripts/extended/event.js17
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);
}