aboutsummaryrefslogtreecommitdiff
path: root/mod/tinymce/views/default/tinymce
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-06 17:54:05 -0500
committerCash Costello <cash.costello@gmail.com>2011-11-06 17:54:05 -0500
commit8699afa034a94cc93a18b20a21aec70e036443fc (patch)
tree3289f4bbe629929ae4f7aac8955e84006901791d /mod/tinymce/views/default/tinymce
parentb11ff06ff2e81c007ce68ed035431bea2455c7e7 (diff)
downloadelgg-8699afa034a94cc93a18b20a21aec70e036443fc.tar.gz
elgg-8699afa034a94cc93a18b20a21aec70e036443fc.tar.bz2
Fixes #3853 caching a bookmark for insert carot when embedding content into TinyMCE editor
Diffstat (limited to 'mod/tinymce/views/default/tinymce')
-rw-r--r--mod/tinymce/views/default/tinymce/embed_custom_insert_js.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/mod/tinymce/views/default/tinymce/embed_custom_insert_js.php b/mod/tinymce/views/default/tinymce/embed_custom_insert_js.php
index d5513cef1..a861a4035 100644
--- a/mod/tinymce/views/default/tinymce/embed_custom_insert_js.php
+++ b/mod/tinymce/views/default/tinymce/embed_custom_insert_js.php
@@ -1,8 +1,14 @@
if (window.tinyMCE) {
var editor = window.tinyMCE.get(textAreaId);
-
+
if (editor) {
+
+ // work around for IE/TinyMCE bug where TinyMCE loses insert carot
+ if ($.browser.msie) {
+ editor.focus();
+ editor.selection.moveToBookmark(elgg.tinymce.bookmark);
+ }
+
editor.execCommand("mceInsertContent", true, content);
}
}
- \ No newline at end of file