From 36aee2d174fab8211a55584db827d70b7ab03766 Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Mon, 9 Oct 2017 14:13:11 +0300 Subject: [PATCH] lets try normalizing the dom before applying a patch --- www/pad/inner.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/www/pad/inner.js b/www/pad/inner.js index 8717f3eb3..9f14d813a 100644 --- a/www/pad/inner.js +++ b/www/pad/inner.js @@ -393,6 +393,11 @@ define([ inner.getAttribute('contenteditable')); restoreMediaTags(userDocStateDom, mediaTagMap); + + // Deal with adjasent text nodes + userDocStateDom.normalize(); + inner.normalize(); + var patch = (DD).diff(inner, userDocStateDom); (DD).apply(inner, patch); displayMediaTags(framework, inner, mediaTagMap);