You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
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
The text was updated successfully, but these errors were encountered: