summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js/common.js
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-10-01 08:29:58 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-10-01 08:29:58 +0000
commit762b28084f8d34aa48436d5d135f33b20fab9051 (patch)
tree14c6a19ecd96c8e0b10e81497d73eb96befad8c0 /roundcubemail/program/js/common.js
parentf72b1907d40aece81c1f21609880ba10cb40d1f4 (diff)
- Stop spellchecking when switching to html editor (#1485362)
git-svn-id: https://svn.roundcube.net/trunk@1904 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/common.js')
-rw-r--r--roundcubemail/program/js/common.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/roundcubemail/program/js/common.js b/roundcubemail/program/js/common.js
index 5049061b4..4b877bac3 100644
--- a/roundcubemail/program/js/common.js
+++ b/roundcubemail/program/js/common.js
@@ -650,3 +650,20 @@ if (bw.ie)
return o;
}
}
+
+
+// Fire event on specified element
+function exec_event(element,event)
+{
+ if (document.createEventObject) {
+ // dispatch for IE
+ var evt = document.createEventObject();
+ return element.fireEvent('on'+event,evt)
+ }
+ else {
+ // dispatch for firefox + others
+ var evt = document.createEvent("HTMLEvents");
+ evt.initEvent(event, true, true); // event type,bubbling,cancelable
+ return !element.dispatchEvent(evt);
+ }
+}