mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user