Editing the DOM ourselves caused Redactor's internal selection to be
out-of-sync with the document.
internalRange = (selection.rangeCount) ? selection.getRangeAt(0).cloneRange() : null;
};
+ this.WoltLabCaret.forceSelectionSave = saveRange;
+
var restoreRange = function () {
if (internalRange === null) return;
//noinspection SillyAssignmentJS
smiley.outerHTML = smiley.outerHTML;
+
+ // force-save the caret position
+ this.WoltLabCaret.forceSelectionSave();
}
}
};