From 2bd56a246f7259a0bde67bb26248cd69a0dd52d2 Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Fri, 29 Oct 2010 22:51:51 +0000 Subject: [PATCH] MDL-24932 Fixed regression caused by the previous commit To reproduce it, I just added a smiley via the popup and inserted some character directly afterwards. While the smiley img was saved, the text was not 8-o (it even did not appear in the HTML source view of the editor before the save). --- .../tiny_mce/3.3.9.2/plugins/moodleemoticon/js/dialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/editor/tinymce/tiny_mce/3.3.9.2/plugins/moodleemoticon/js/dialog.js b/lib/editor/tinymce/tiny_mce/3.3.9.2/plugins/moodleemoticon/js/dialog.js index 86359a921ca..ae504d0a84a 100644 --- a/lib/editor/tinymce/tiny_mce/3.3.9.2/plugins/moodleemoticon/js/dialog.js +++ b/lib/editor/tinymce/tiny_mce/3.3.9.2/plugins/moodleemoticon/js/dialog.js @@ -3,7 +3,7 @@ var MoodleEmoticonDialog = { bookmark : null, init : function() { - this.bookmark = tinyMCEPopup.editor.selection.getBookmark(); + this.bookmark = tinyMCEPopup.editor.selection.getBookmark(1, true); // register event handlers for the table rows tinymce.each(tinymce.DOM.select('tr.emoticoninfo', document), function(row) { @@ -36,7 +36,7 @@ var MoodleEmoticonDialog = { if (i == index) { tinyMCEPopup.editor.selection.moveToBookmark(this.bookmark); tinyMCEPopup.editor.execCommand('mceInsertContent', false, emoticons[emoticon]); - this.bookmark = tinyMCEPopup.editor.selection.getBookmark(); + this.bookmark = tinyMCEPopup.editor.selection.getBookmark(1, true); tinyMCEPopup.close(); return; }