-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(modal): remove 'modal-open' from body
- Loading branch information
1 parent
08d7425
commit 6ed7253
Showing
1 changed file
with
3 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6ed7253
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit creates an issue:
The same
hide
method is also used bypopover
.The logic behind
if (!modalStack.length) {
is "if modalStack is empty, then there is no modal, then we can executeremoveClass
"...Which is not correct, as
modalStack
also contains popovers, and thehide
method must also handle the removal of the classpopover-open
.You may open a
popover
P1 in amodal
M1. You now have M1 and P1 in themodalStack
. This will result in having bothmodal-open
andpopover-open
class inbody
.When calling
hide
of thepopover
(dismiss, tapped...), the condition will not be filled becausemodalStack
still contains an item: the modal M1. Thus, classpopover-open
is not removed frombody
... You can still close the modal, but then your UI comes totally un-tappable and looks like "frozen".6ed7253
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request opened to resolve this: ionic-team/ionic-v1#219