angular-aside icon indicating copy to clipboard operation
angular-aside copied to clipboard

Modal opens and closes immediately

Open qz2rg4 opened this issue 9 years ago • 1 comments

Hi

I have a problem where the modal left menu opens but immediately closes. Funny enough when I click on the link and hold the modal appears and stays. Please assist

Here is my code

$scope.openAside = function (position) { $aside.open({

                                   templateUrl: 'aside.html',
                                   placement: position,
                                   backdrop: true,
                                   controller: function ($scope, $modalInstance) {
                                       $scope.ok = function (e) {
                                           $modalInstance.close();
                                           e.stopPropagation();
                                       };
                                       $scope.cancel = function (e) {
                                           $modalInstance.dismiss();
                                           e.stopPropagation();
                                       };
                                   }
                               });
                           };

qz2rg4 avatar Jul 23 '15 08:07 qz2rg4

I've had this issue as well. Particularly on Safari on iOS. The first time you open it, it works fine. If you then close it and open it again, it disappears. After doing a bit of research it seems as if the default Bootstrap UI animation is also still effective. So it not only animates from left to right (in my case) when it closes, but if you look closely you see it move to the top as well.

And as it turns out, if I disable animation by setting the animation option to false it seems to work as expected. This still animates the sidebar, since ng-aside ignores the animation option.

It might be more elegant to fix the issue by changing the CSS such that the the Bootstrap UI animation is disabled. And also on a side-note, it would be nice if the animation flag would also apply to the ng-aside sidebar.

intodevelopment avatar Dec 07 '15 20:12 intodevelopment