Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Body can be cloned..Fix #349

Open
AbdisamadMoh opened this issue May 4, 2024 · 1 comment
Open

Body can be cloned..Fix #349

AbdisamadMoh opened this issue May 4, 2024 · 1 comment

Comments

@AbdisamadMoh
Copy link

AbdisamadMoh commented May 4, 2024

Thanks for this amazing editor.
If you click clone on the body it gets cloned. u will get more than 1 body tag.
checking if the tagtName == BODY helped me.

cloneNode: function (node) {
   if (!node) {
     node = Vvveb.Builder.selectedEl;
   }
   if (node.tagName == "BODY") return; /here

   clone = node.cloneNode(true);

   node.after(clone);

   node = clone.click();

   element = clone;

   Vvveb.Undo.addMutation({
     type: "childList",
     target: node.parentNode,
     addedNodes: [element],
     nextSibling: node.nextSibling,
   });
 }
@givanz
Copy link
Owner

givanz commented May 30, 2024

Thanks for the bug report, it was fixed in 16bde56 now all actions are hidden for body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants