diff --git a/src/Components/Web.JS/src/Rendering/DomMerging/DomSync.ts b/src/Components/Web.JS/src/Rendering/DomMerging/DomSync.ts index b86ff3bd8d03..20d318d770b8 100644 --- a/src/Components/Web.JS/src/Rendering/DomMerging/DomSync.ts +++ b/src/Components/Web.JS/src/Rendering/DomMerging/DomSync.ts @@ -185,22 +185,21 @@ function treatAsMatch(destination: Node, source: Node) { break; } case Node.ELEMENT_NODE: { - const editableElementValue = getEditableElementValue(source as Element); - synchronizeAttributes(destination as Element, source as Element); - applyAnyDeferredValue(destination as Element); - if (isDataPermanentElement(destination as Element)) { - // The destination element's content should be retained, so we avoid recursing into it. + // The destination element's content and attributes should be retained. } else { + const editableElementValue = getEditableElementValue(source as Element); + synchronizeAttributes(destination as Element, source as Element); + applyAnyDeferredValue(destination as Element); synchronizeDomContentCore(destination as Element, source as Element); - } - // This is a much simpler alternative to the deferred-value-assignment logic we use in interactive rendering. - // Because this sync algorithm goes depth-first, we know all the attributes and descendants are fully in sync - // by now, so setting any "special value" property is just a matter of assigning it right now (we don't have - // to be concerned that it's invalid because it doesn't correspond to an