1
0
mirror of https://github.com/bitwarden/web synced 2026-01-02 16:43:24 +00:00

callback whenever closing modal

This commit is contained in:
Kyle Spearrin
2017-07-25 15:00:20 -04:00
parent f46a6aefea
commit 444f63db42
6 changed files with 53 additions and 3 deletions

View File

@@ -97,7 +97,18 @@
}).$promise;
}
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();
});
});