Fix back button behavior

This commit is contained in:
Skylar Ittner 2018-11-01 23:57:42 -06:00
parent 5691744543
commit 21c5113b88

View File

@ -70,17 +70,16 @@ document.addEventListener("backbutton", function (event) {
var iframe = document.getElementById("appframe");
iframe.contentWindow.postMessage("goback", "*");
historyctr--;
} else if (_returnscreen != null) {
openscreen(_returnscreen, "FADE");
_returnscreen = null;
} else {
openscreen("home", "FADE");
if (cordova.platformId == 'android') {
StatusBar.backgroundColorByHexString("#1976d2");
} else {
StatusBar.backgroundColorByHexString("#2196f3");
}
router.back();
}
} else {
if (_returnscreen != null) {
openscreen(_returnscreen, "FADE");
_returnscreen = null;
}
router.back();
}
}, false);