[ts][wecomponents] Use computed style to determine overlay z-index.

This commit is contained in:
Davide Tantillo 2025-05-12 11:52:12 +02:00
parent 4acd202f41
commit 158a4922cd

View File

@ -1008,7 +1008,7 @@ export class SpineWebComponentOverlay extends HTMLElement implements OverlayAttr
let parent: HTMLElement | null = element;
let zIndex: undefined | number;
do {
let currentZIndex = parseInt(parent!.style.zIndex);
let currentZIndex = parseInt(getComputedStyle(parent).zIndex);
// searching the shallowest z-index
if (!isNaN(currentZIndex)) zIndex = currentZIndex;