I would like to close the window with a click on the background.
This would be nicer to use on mobile devices.
How can I do that?
Thank you!
0
Dimo
Telerik team
answered on 13 Aug 2014, 10:13 AM
Hello Christian,
You can attach a click handler on the page <body> and close the Window via its API method. Don't forget to check whether the original target element inside the event handler is outside the Window, otherwise you should not close it.
If the Window is modal, you can attach a click handler only to the modal overlay, which is a div.k-overlay element and a child of the <body>.
Regards,
Dimo
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.