New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Popover and Modals interfering, body classes do not get removed - bug newly introduced with 1.3.2 #9069
Comments
Already happened with me. Yesterday i updated to version 1.3.2 and after i opened a modal from a popover, for the second time, the screen has freezed and i see the "popover-open" in the body that is causing this issue. |
Well, yes, it seems I forgot to mention this crucial fact: The screen freezes after opening a modal from a popover and then closing the modal. No screen interaction is possible anymore then. |
@brandyscarney this is v1 not v2 |
@leschirmeur Oops, sorry about that. I must have been trigger happy selecting issues to label. :) |
@brandyscarney :-) |
and this bug makes the app freez in this scenario: and that's because the "modal-open" class doesn't remove if u closed the modal and there's a popover open and that class preventing any action on the page |
sorry i didn't noticed that u r mentioned that scenario above in the comments guys :) |
Hi guys, I've just run into the same issue. Although this appears to be a regression in 1.3.2, it's easy enough to work around. In my case I was doing something that boiled down to: myPopover.show();
// on clicking an item in the popover
myPopover.hide();
$ionicModal.fromTemplateUrl('foo.html', { scope: $scope })
.then(modal => {
modal.show();
}); This used to work, but now hits the issue reported here. However, by waiting for the popover to hide before showing the modal, then the So, the above changes to: myPopover.show();
// on clicking an item in the popover
myPopover.hide()
.then(() => {
// Popover is hidden, so now open the modal
$ionicModal.fromTemplateUrl('foo.html', { scope: $scope })
.then(modal => {
modal.show();
});
}); |
i noticed that the problem not with popover only , it's happened if there's any tow of popup active together so it's happened if there's any tow of those together : modal - alert - popover - confirm and i think even loading any tow of those i mentioned above active together when close one of them the class will not remove |
+1 |
Hi. As referenced a few minutes ago, I created an issue for the same bug: #9538. I wrote a fix (didn't take the pain to create a proper pull request as I don't know if the team is still working on v1...). Find:
And replace by:
Enjoy |
Hi @VinceOPS, I was under the impression that whilst there won't be new features for v1, bug fixes are still going to be addressed. If you can, I'd definitely create a PR with the fix! :) |
This issue was moved to ionic-team/ionic-v1#71 |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Short description of the problem:
Commit 6ed7253 introduces a bug that the "popover-open" class is not removed from body if a modal is open at the same time.
What behavior are you expecting?
Removing a popover must remove the "popover-open" class from body element, even though a modal is open at the same time.
Steps to reproduce:
--> class "popover-open" not removed from body element
As modalStack can contain both modals and popovers, the newly introduced if-condition must take the entry type into consideration, i.e. "modal" or "popover". Otherwise, a "popover-open" class is not removed if modalStack contains any modals and vice versa for class "modal-open".
Which Ionic Version? 1.x or 2.x
1.3.2
Run
ionic info
from terminal/cmd prompt: (paste output below)Cordova CLI: 6.4.0
Gulp version: CLI version 1.2.2
Gulp local: Local version 3.9.1
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: 1.9.0
ios-sim version: 5.0.10
OS: Mac OS X El Capitan
Node Version: v4.6.0
Xcode version: Xcode 8.1 Build version 8B62
The text was updated successfully, but these errors were encountered: