lets try normalizing the dom before applying a patch

pull/1/head
Caleb James DeLisle 7 years ago
parent 828a685ba8
commit 36aee2d174

@ -393,6 +393,11 @@ define([
inner.getAttribute('contenteditable')); inner.getAttribute('contenteditable'));
restoreMediaTags(userDocStateDom, mediaTagMap); restoreMediaTags(userDocStateDom, mediaTagMap);
// Deal with adjasent text nodes
userDocStateDom.normalize();
inner.normalize();
var patch = (DD).diff(inner, userDocStateDom); var patch = (DD).diff(inner, userDocStateDom);
(DD).apply(inner, patch); (DD).apply(inner, patch);
displayMediaTags(framework, inner, mediaTagMap); displayMediaTags(framework, inner, mediaTagMap);

Loading…
Cancel
Save