mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 11:43:46 +00:00
callback whenever closing modal
This commit is contained in:
@@ -99,7 +99,18 @@
|
||||
return str;
|
||||
}
|
||||
|
||||
var closing = false;
|
||||
$scope.close = function () {
|
||||
closing = true;
|
||||
$uibModalInstance.close($scope.enabled);
|
||||
};
|
||||
|
||||
$scope.$on('modal.closing', function (e, reason, closed) {
|
||||
if (closing) {
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
$scope.close();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user