Skip to content

Commit d41dedb

Browse files
JimMorrison723thePunderWoman
authored andcommitted
fix(devtools): highlighter should only show the hovered component's name (angular#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 angular#44863
1 parent 2006f53 commit d41dedb

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

devtools/projects/ng-devtools-backend/src/lib/highlighter.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,7 @@ function showOverlay(
131131
overlay.style.top = ~~top + 'px';
132132
overlay.style.left = ~~left + 'px';
133133

134-
while (overlayContent.children.length) {
135-
const {children} = overlayContent;
136-
overlayContent.removeChild(children[children.length - 1]);
137-
}
134+
overlayContent.replaceChildren();
138135

139136
content.forEach((child) => overlayContent.appendChild(child));
140137

0 commit comments

Comments
 (0)