fix(devtools): highlighter should only show the hovered component's name (#44863)

The used children property on a HTMLCollection does not contain text elements. Because of this, the highlighter overlay text never got fully cleared.

PR Close #44863
This commit is contained in:
JimMorrison723
2022-01-27 19:56:40 +01:00
committed by Jessica Janiuk
parent 2006f53b48
commit d41dedb85b
@@ -131,10 +131,7 @@ function showOverlay(
overlay.style.top = ~~top + 'px';
overlay.style.left = ~~left + 'px';
while (overlayContent.children.length) {
const {children} = overlayContent;
overlayContent.removeChild(children[children.length - 1]);
}
overlayContent.replaceChildren();
content.forEach((child) => overlayContent.appendChild(child));