Explorar o código

fix write in readonly shadowRoot

Gildas %!s(int64=3) %!d(string=hai) anos
pai
achega
ccfbb5bbd1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/extension/ui/content/content-ui-editor-web.js

+ 1 - 1
src/extension/ui/content/content-ui-editor-web.js

@@ -1709,7 +1709,7 @@ table {
 				containerElement.shadowRoot.appendChild(shadowRoots[noteId]);
 			}
 		});
-		document.querySelectorAll(NOTE_TAGNAME).forEach(containerElement => containerElement.shadowRoot = shadowRoots[containerElement.dataset.noteId]);
+		document.querySelectorAll(NOTE_TAGNAME).forEach(containerElement => shadowRoots[containerElement.dataset.noteId].childNodes.forEach(node => containerElement.shadowRoot.appendChild(node)));
 		document.body.contentEditable = contentEditable;
 		document.head.querySelectorAll("style").forEach(styleElement => styleElement.remove());
 		const styleElement = document.createElement("style");