mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
amend($ionicModal): if hardwareBackButtonClose false, back button is noop
Addresses #1397
This commit is contained in:
10
js/angular/service/modal.js
vendored
10
js/angular/service/modal.js
vendored
@@ -128,12 +128,10 @@ function($rootScope, $document, $compile, $timeout, $ionicPlatform, $ionicTempla
|
||||
.removeClass('ng-leave ng-leave-active');
|
||||
|
||||
self._isShown = true;
|
||||
self._deregisterBackButton = self.hardwareBackButtonClose ?
|
||||
$ionicPlatform.registerBackButtonAction(
|
||||
angular.bind(self, self.hide),
|
||||
PLATFORM_BACK_BUTTON_PRIORITY_MODAL
|
||||
) :
|
||||
angular.noop;
|
||||
self._deregisterBackButton = $ionicPlatform.registerBackButtonAction(
|
||||
self.hardwareBackButtonClose ? angular.bind(self, self.hide) : angular.noop,
|
||||
PLATFORM_BACK_BUTTON_PRIORITY_MODAL
|
||||
);
|
||||
|
||||
self._isOpenPromise = $q.defer();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user