diff --git a/UI/WebServerResources/js/Contacts/AddressBooksController.js b/UI/WebServerResources/js/Contacts/AddressBooksController.js index 85d833788..203954265 100644 --- a/UI/WebServerResources/js/Contacts/AddressBooksController.js +++ b/UI/WebServerResources/js/Contacts/AddressBooksController.js @@ -31,7 +31,7 @@ vm.editMode = false; AddressBook.$query.value = ''; // Close sidenav on small devices - if ($mdMedia('sm')) + if ($mdMedia('xs')) $mdSidenav('left').close(); $state.go('app.addressbook', {addressbookId: folder.id}); } diff --git a/UI/WebServerResources/js/Preferences/PreferencesController.js b/UI/WebServerResources/js/Preferences/PreferencesController.js index 9e3dd667f..cfe8ed34f 100644 --- a/UI/WebServerResources/js/Preferences/PreferencesController.js +++ b/UI/WebServerResources/js/Preferences/PreferencesController.js @@ -7,8 +7,8 @@ /** * @ngInject */ - PreferencesController.$inject = ['$q', '$window', '$state', '$mdDialog', '$mdToast', 'sgFocus', 'Dialog', 'User', 'Account', 'statePreferences', 'Authentication']; - function PreferencesController($q, $window, $state, $mdDialog, $mdToast, focus, Dialog, User, Account, statePreferences, Authentication) { + PreferencesController.$inject = ['$q', '$window', '$state', '$mdMedia', '$mdSidenav', '$mdDialog', '$mdToast', 'sgFocus', 'Dialog', 'User', 'Account', 'statePreferences', 'Authentication']; + function PreferencesController($q, $window, $state, $mdMedia, $mdSidenav, $mdDialog, $mdToast, focus, Dialog, User, Account, statePreferences, Authentication) { var vm = this, account, mailboxes = []; vm.preferences = statePreferences; @@ -56,6 +56,9 @@ }); function go(module) { + // Close sidenav on small devices + if ($mdMedia('xs')) + $mdSidenav('left').close(); $state.go('preferences.' + module); }