From 673691f329517e1631df5232fdbe444c6f5e0ca4 Mon Sep 17 00:00:00 2001 From: Fernando Zanutto Date: Tue, 23 Apr 2024 15:47:10 -0300 Subject: [PATCH] feat: use role attribute instead of using class with no style --- src/renderer/components/modal/modal.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/modal/modal.tsx b/src/renderer/components/modal/modal.tsx index 0f15a0de..6cd417dd 100644 --- a/src/renderer/components/modal/modal.tsx +++ b/src/renderer/components/modal/modal.tsx @@ -40,7 +40,7 @@ export function Modal({ }; const isTopMostModal = () => { - const openModals = document.getElementsByClassName("modal-container"); + const openModals = document.querySelectorAll("[role=modal-container]"); return ( openModals.length && openModals[openModals.length - 1].id === "modal-container-" + componentId @@ -85,7 +85,8 @@ export function Modal({ return createPortal(