mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(devtools): fix component inspector highlighting (#59995)
Use `position: absolute` instead of `position: fixed`. This fixes the odd behavior that can be reproduced when scrolling. PR Close #59995
This commit is contained in:
parent
7a8e8f37c0
commit
c513e5dc2b
1 changed files with 3 additions and 3 deletions
|
|
@ -39,7 +39,7 @@ function createOverlay(color: RgbColor): {overlay: HTMLElement; overlayContent:
|
|||
const overlay = document.createElement('div');
|
||||
overlay.className = 'ng-devtools-overlay';
|
||||
overlay.style.backgroundColor = toCSSColor(...color, 0.35);
|
||||
overlay.style.position = 'fixed';
|
||||
overlay.style.position = 'absolute';
|
||||
overlay.style.zIndex = '2147483647';
|
||||
overlay.style.pointerEvents = 'none';
|
||||
overlay.style.display = 'flex';
|
||||
|
|
@ -196,8 +196,8 @@ function showOverlay(
|
|||
const {width, height, top, left} = dimensions;
|
||||
overlay.style.width = ~~width + 'px';
|
||||
overlay.style.height = ~~height + 'px';
|
||||
overlay.style.top = ~~top + 'px';
|
||||
overlay.style.left = ~~left + 'px';
|
||||
overlay.style.top = ~~top + window.scrollY + 'px';
|
||||
overlay.style.left = ~~left + window.scrollX + 'px';
|
||||
|
||||
positionOverlayContent(overlayContent, dimensions, labelPosition);
|
||||
overlayContent.replaceChildren();
|
||||
|
|
|
|||
Loading…
Reference in a new issue