close a modal window when the user clicks on the background?

Hi,

I would like to close a modal window when the user touches the modal background. Is this possible?

Modal window wasn’t designed to do so, but you can use global WebixonFocusChange event and catch the moment when the modal hover (in fact, it’s just a transparent div) was touched. For example:

webix.attachEvent("onFocusChange", function(to, from){ 
	if (from && from.getTopParentView().config.view == "window" && !to){
		from.getTopParentView().hide();
	}
})

The point is that the hover is not the Webix view, so the event handler will considerto parameter as a null.