Close modal popup div when click outside of it ( without popover )

  • jehex-1335976848101736601

    Jehex

    5 days ago

    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 ?
  • andreasmoller-1336214104011964417

    Andreas Møller

    4 days ago

    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
  • jehex-1336227744358338590

    Jehex

    4 days ago

    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.kayr-1336254362564952084

    Max

    4 days ago

    I am very sure that you can do a login screen in a Spark Core dialog 🙂

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code — but accessible to your entire team!

Try toddle — it's free!

© Copyright 2024 toddle. All rights reserved.