close all open popups or windows

i need a help on closing all the popups or windows opended so far with webix.ui,can you guys give me suggestion to destroy all of those,it hangs the browser completely if we are not destroying those windows.

Thanks

Hi,

By default, all popups will be closed on external click, so you can just call global click event on window scroll:

webix.callEvent("onClick", [])

Please mind that the above solution goes only for popups, and it will just hide them (but not destroy completely).

If you are speaking about windows, or want to destroy them, you can iterate through all created views in the app and apply the close() method to found windows:

for(var i in webix.ui.views){
    if(webix.ui.views[i].name === "window") // or "popup"
      webix.ui.views[i].close();
  }

https://snippet.webix.com/j9cusxeh

Also could you please provide more details on your use case?

it hangs the browser completely if we are not destroying those windows

Normally, such situation does not arise.

thanks helga we resolved our issue