how can i close the window when controls is moved from it for below snippet

https://snippet.webix.com/abze9ynr here after clicking the button i get a window, then i would like to close the window when ever i click outside of it. [similar to behaviour of the popup opened]

for the above snippet the window should not disappear when we click on the window itself @Dzmitry

Hello @rajkumar,

  1. Popup and window are almost the same. If you use the window only to get the title, then it is better to write it in a pop-up body:
    https://snippet.webix.com/9wvxmf6p
  2. Window will not be closed without calling hide directly (or close to destroy it).
    In onFocusChange event handler, you can write a logic that closes the window.
    Please check the snippet:
    https://snippet.webix.com/8q0nxljd

@annazankevich https://snippet.webix.com/8q0nxljd in given snippet, is there any possibility to achieve the requirement without using global event, onfocusChange

@rajkumar,
Unfortunately not, as there is no other way to maintain an outside click/focus for a window or another view