Open AbdisamadMoh opened 6 months ago
Node gets inserted after the body tag if you choose insert "AFTER"
function addSectionComponent(component, after = true) { let node = generateElements(component.html)[0]; if (after) { //start if (addSectionElement.tagName == "BODY") { addSectionElement.append(node); } else { addSectionElement.after(node); } //end } else { addSectionElement.append(node); } if (component.afterDrop) { node = component.afterDrop(node); } node = node; self.selectNode(node); self.loadNodeComponent(node); Vvveb.TreeList.loadComponents(); Vvveb.TreeList.selectComponent(node); Vvveb.Undo.addMutation({ type: "childList", target: node.parentNode, addedNodes: [node], nextSibling: node.nextSibling, }); }
If the selected node is body insert within the body.
Thanks for the bug report, it was fixed in https://github.com/givanz/VvvebJs/commit/d575326733efe933b7d55ce3818449f18c9b620a add component button is hidden for body.
Node gets inserted after the body tag if you choose insert "AFTER"
If the selected node is body insert within the body.