Skip to content

Commit 58fa456

Browse files
committed
fix modal not appearing on second click
1 parent 503291e commit 58fa456

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

client/directives/modals/directiveModal.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ require('app')
55
*/
66
function modal(
77
$templateCache,
8+
$timeout,
89
$compile,
910
keypather,
1011
$rootScope,
@@ -64,9 +65,11 @@ function modal(
6465
if (typeof keypather.get($scope, 'actions.closePopover') === 'function') {
6566
$scope.actions.closePopover();
6667
}
68+
// Trigger a digest cycle
69+
$timeout(angular.noop);
6770
}
6871

69-
element[0].onclick = createModal;
72+
element.on('click', createModal);
7073
$scope.$watch('data.in', function(n) {
7174
if (n === true) {
7275
createModal();

0 commit comments

Comments
 (0)