diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-07-10 11:38:01 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-07-10 11:38:01 -0400 |
| commit | 52bda7938480d4aa6a7f85c4fd3be11c11e9f559 (patch) | |
| tree | 6263d74545c76b4911cd428ed70466b1d9ad8b86 /www/js/app.js | |
| parent | 042d055d52f4448b8a42261fcf709147910a4638 (diff) | |
#281 - tweak back button handling
Former-commit-id: ca2d7af43c1bc0658edf7477fbcfdb0a32955b4a
Diffstat (limited to 'www/js/app.js')
| -rw-r--r-- | www/js/app.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/www/js/app.js b/www/js/app.js index 7ffc2933..4c76bee4 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -950,7 +950,7 @@ angular.module('zmApp', [ // only for android $rootScope.exitApp = function () { ZMDataModel.zmLog("user exited app"); - ZMDataModel.zmLog("user exited app"); + ionic.Platform.exitApp(); }; @@ -982,15 +982,17 @@ angular.module('zmApp', [ // This code takes care of trapping the Android back button // and takes it to the menu. + console.log (">>>>>>>>>>>>>>>>>>BACK BUTTON REGISTERED"); $ionicPlatform.registerBackButtonAction(function (e) { e.preventDefault(); + console.log ("******** back called with isOpenLeft: " + $ionicSideMenuDelegate.isOpenLeft()); if (!$ionicSideMenuDelegate.isOpenLeft()) { $ionicSideMenuDelegate.toggleLeft(); - //console.log("Status of SIDE MENU IS : " + $ionicSideMenuDelegate.isOpen()); + console.log("Status of SIDE MENU IS : " + $ionicSideMenuDelegate.isOpen()); } else { navigator.app.exitApp(); } - }, 1000); + }, 501); // this works reliably on both Android and iOS. The "onorientation" seems to reverse w/h in Android. Go figure. |
