Close Modal window when user clicks off of it

0 Answers 173 Views
Window
Christopher
Top achievements
Rank 1
Christopher asked on 02 Aug 2021, 01:57 PM
Hello, I'm trying to figure out a way to trigger an event to close when the Modal window looses focus from the user for example when they click outside of the box. I've looked through the documentation for the window component and although their are keyboard shortcuts such as "ESC" to close the window I couldn't find any events for closing the window based on lose of focus. Any suggestions or assistance with this issue would be great.
Blazorist
Top achievements
Rank 1
Iron
Iron
Veteran
commented on 02 Aug 2021, 04:25 PM | edited

Hi Christopher.
There was a request about something like that... 

Here: https://feedback.telerik.com/blazor/1451714-window-modal-click-on-overlay-to-close?_ga=2.268782450.2060060634.1627913753-1735856614.1611674562&_gac=1.48456338.1627913764.EAIaIQobChMIxZi4usb_8QIVmeyGCh0trwNwEAAYASAAEgK6cfD_BwE

There is an example attached with a workaround to achieve what you need. 
Hope that help at least as inspiration. 

Blazorist.

 

No answers yet. Maybe you can help?

Tags
Window
Asked by
Christopher
Top achievements
Rank 1
Share this question
or