Closed KroloRDS closed 2 years ago
Hi @KroloRDS,
Which version are you using? I haven't been able to reproduce this behavior in the lastes release.
That said, we reccomend avoiding having more open modals on the page - it gives a poorer user experience and can result in the user losing the sense of where they are on the page.
Best regards, Kristina Jensen Det Fælles Designsystem
Hello FDS,
I noticed that when I open a modal pop-up on top of another modal the backdrop effect (background dimming black) is applied twice. Then, if I close the top modal the backdrop is gone completely.
![no_dim](https://user-images.githubusercontent.com/46683044/126750772-e4a25767-b1c3-4a8b-b8d9-111c3fe159fa.png)
My proposed solution would be to check before showing/hiding if any other modal is currently shown, like so:
document.querySelector(".fds-modal[aria-hidden='false']") !== null
And apply/remove backdrop accordingly.