diff --git a/src/af.ui.js b/src/af.ui.js index c010fcbf5..492ba24c5 100644 --- a/src/af.ui.js +++ b/src/af.ui.js @@ -860,11 +860,6 @@ //Add the back button if it's not there if(hdr.find(".backButton").length===1) return; hdr.prepend("" + this.backButtonText + ""); - //Fix device click no response issue - hdr.on("click", ".backButton", function() { - if(this.useInternalRouting) - this.goBack(this); - }); } else { hdr.find(".backButton").remove(); @@ -971,11 +966,13 @@ if(!back){ this.classList.remove("active"); //If 'this' is view, then find active panel and remove active from it - var activePanel = $(this).find(".active").get(0); - if (undefined !== activePanel) { - activePanel.classList.remove("active"); + var tmpActive = $(this).find(".active").get(0); + if (undefined !== tmpActive) { + $(tmpActive).trigger("panelunload", [back]); + tmpActive.classList.remove("active"); } - $(this).trigger("panelunload", [back]); + //Below trigger will be called when 'to animation' done + //$(this).trigger("panelunload", [back]); } else{ this.classList.add("active"); @@ -1001,6 +998,7 @@ //Fixes #850, #860, #873 var tmpActive = $(hide).find(".active").get(0); if (undefined !== tmpActive) { + $(tmpActive).trigger("panelunload", [back]); tmpActive.classList.remove("active"); } @@ -1012,9 +1010,10 @@ } this.classList.remove("active"); //If 'hide' is view, then find active panel and remove active from it - var activePanel = $(this).find(".active").get(0); - if (undefined !== activePanel) { - activePanel.classList.remove("active"); + var tmpActive = $(this).find(".active").get(0); + if (undefined !== tmpActive) { + $(tmpActive).trigger("panelunload", [back]); + tmpActive.classList.remove("active"); } $(hide).trigger("panelload", [back]); $(hide).addClass("active");