Close modal popup div when click outside of it ( without popover )
Jehex
5 days ago
Feb 3, 2025, 2:15 PM
Hi there, Im a bit stuck on this " classic " feature about my popup, unfortunately I ended too add some html elements ( like a hidden div who cover all the screen ) or some JS, I cannot use popover for my situation also :/ Is they're " clean " way to implement this basic action ?
Andreas Møller
4 days ago
Feb 4, 2025, 5:57 AM
You can add a div that sits behind the pop up but on top of the rest of the content. When the doc is clicked you close the pop up. I would recommend using the spark core library though. It handles all the strange edge cases aswell
Hi there, I tried spark core library ( dialog component ) but it was not adapted to my case ( modal login section inside a component ), will try to find a way with the div overlay
Max
4 days ago
Feb 4, 2025, 8:37 AM
I am very sure that you can do a login screen in a Spark Core dialog 🙂