close popup when clicked outside

Is it possible to detect when a user clicks outside a popup? I would like to close the popup window when this happens.

fixed by setting modal: false and capturing the correct events

I’ve fixed this using jQuery. Seems to work well. Put the snippet below in the onShow event:

var self = this;
$(".webix_modal").one(“click”, function() {
self.hide();
});