-
-
Notifications
You must be signed in to change notification settings - Fork 423
Open
Description
Describe the issue
The notes for version 6.34.0 state "...and uses cloneNode
when a raw element is passed in ..."
Cloning a node does not copy event listeners added using addEventListener() or those assigned to element properties (e.g., node.onclick = someFunction). https://developer.mozilla.org/en-US/docs/Web/API/Node/cloneNode
An HTMLElement created like this
const buttonElement = document.createElement("button");
buttonElement.innerText = "Click Me";
buttonElement.addEventListener("click", () => {
console.log('Button in placeholder was clicked')
});
});
and passed to the placeholder method worked as expected in version 6.33.0
The same code does not work in version 6.34.0 because the event listener is not copied in version 6.34.0
Please consider making note of this breaking change in the notes for version 6.34.0 and adding this detail to the documentation for the placeholder method.
Browser and platform
No response
Reproduction link
No response
Metadata
Metadata
Assignees
Labels
No labels