Open tmsns opened 4 years ago
The issue resides here: https://github.com/webcomponents/polyfills/blob/master/packages/shadydom/src/patches/Node.js#L463
The two functions should only be executed if node
and ref_node
are different.
If you guys like, I can send in a MR? 😃
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed after being marked stale. If you're still facing this problem with the above solution, please comment and we'll reopen!
Description
When using
Node.prototype.replaceChild
with the same node as ref_node, the node gets cleaned. (eg. removed from its parent)Example
https://jsbin.com/qajapuxupa/1/edit?html,console,output
Steps to reproduce
div
and aspan
withinreplaceChild
ondiv
, but usespan
for both the node as the ref_nodespan
element is not connected anymore.Expected behavior
The
span
element is untouched. (check other browsers)Actual behavior
The
span
element has been cleanedVersion
@webcomponents/webcomponentsjs@2.4.3
Browsers affected