Cordova: Close sheet modal when back button pressed
This commit is contained in:
parent
09b51d95f0
commit
403708572e
@ -113,7 +113,12 @@ function initCordova() {
|
||||
platform_type = "cordova";
|
||||
// Handle back button to close things
|
||||
document.addEventListener("backbutton", function (event) {
|
||||
// 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") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user