Fix text duplication bug #352

This commit is contained in:
yflory 2020-02-14 18:11:22 +01:00
parent adc64f0c6e
commit 10f97354fe
2 changed files with 5 additions and 2 deletions

View File

@ -111,10 +111,13 @@ define([
}
};
exp.removeCursors = function () {
exp.removeCursors = function (inner) {
for (var id in cursors) {
deleteCursor(id);
}
// If diffdom has changed the cursor element somehow, we'll have cursor elements
// in the dom but not in memory: remove them
$(inner).find('.cp-cursor-position').remove();
};
exp.cursorGetter = function (hjson) {

View File

@ -665,7 +665,7 @@ define([
// We have to remove the cursors before getting the content because they split
// the text nodes and OT/ChainPad would freak out
cursors.removeCursors();
cursors.removeCursors(inner);
displayMediaTags(framework, inner, mediaTagMap);
inner.normalize();