Skip to content

Commit

Permalink
MDL-24932 Fixed regression caused by the previous commit
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
mudrd8mz committed Oct 29, 2010
1 parent d504aeb commit 2bd56a2
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 2bd56a2

Please sign in to comment.