mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
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).
This commit is contained in:
parent
d504aeba97
commit
2bd56a246f
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user