Skip to content
This repository has been archived by the owner on Apr 18, 2020. It is now read-only.

Modal opens and closes immediately #21

Open
qz2rg4 opened this issue Jul 23, 2015 · 1 comment
Open

Modal opens and closes immediately #21

qz2rg4 opened this issue Jul 23, 2015 · 1 comment

Comments

@qz2rg4
Copy link

qz2rg4 commented Jul 23, 2015

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();
                                       };
                                   }
                               });
                           };
@intodevelopment
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants