diff --git a/www/assets/js/platform.js b/www/assets/js/platform.js index b2902e3..63f4cbb 100644 --- a/www/assets/js/platform.js +++ b/www/assets/js/platform.js @@ -113,7 +113,12 @@ function initCordova() { platform_type = "cordova"; // Handle back button to close things document.addEventListener("backbutton", function (event) { - router.back({force: true, ignoreCache: true}); + // Close map sheet if it's open + if ($(".sheet-modal").hasClass("modal-in")) { + app.sheet.close(); + } else { + router.back({force: true, ignoreCache: true}); + } }, false); document.addEventListener("deviceready", function () { if (localStorage.getItem("wakelock") == "true") {