History back & window close

Hello Folks!

how make if i click back in browser ? window close/? thx.

Hello,

Use the onBeforeHistoryNav event:

$$("tabbar").attachEvent("onBeforeHistoryNav", function(viewId){
    // your code 
})
webix.ui({
				view:"window",
				id:"portfolio",
				css:"wq",
				modal:true,
				fullscreen:true,
				move:false,
			   			           head: {
                                        view: "toolbar",
                                        elements: [{view:"label", label: "Мы можем" }, {
                                            view: "icon",
                                            icon: "times",
                                            hotkey: "esc",
                                            click: function() {
                                                this.getTopParentView().hide();     

                                            }
                                        }]
                                    },					body:{ view:"scrollview", body:{ 

					         view:"tabview",
           					 cells:uslugi




				}}
			}).show();

webix.$$("portfolio").attachEvent("onBeforeHistoryNav", function(viewId){
    webix.$$("portfolio").hide();
});


почему то не срабатывает?

Событие должно быть привязано к таббару, историю которого Вы трекаете:

webix.$$("toolbar_id").attachEvent("onBeforeHistoryNav", function(viewId){
    webix.$$("portfolio").hide();
});

this solution better


function hashHandler(){
    this.oldHash = window.location.hash;
    this.Check;

    var that = this;
    var detect = function(){
        if(that.oldHash!=window.location.hash){
	webix.$$("q").hide();
            //alert("HASH CHANGED - new has" + window.location.hash);
            that.oldHash = window.location.hash;
        }
    };
    this.Check = setInterval(function(){ detect() }, 100);
}

var hashDetection = new hashHandler();