[Issue] Click events outside the boudary of popup closes the modal

In the pen, open the modal and click on show button on the header bar of the modal. It should open the a popup.

Now fire a click event anywhere outside the boundary of the popup but within the boundary of the modal and the model in the background closes.

Is this a bug or a feature :wink:

feature:
http://ionicframework.com/docs/api/controller/ionicModal/

{boolean=} backdropClickToClose Whether to close the modal on clicking the backdrop. Default: true.

Oops sorry! Did not go through the docs thoroughly before posting :frowning:
My bad !

I’m on beta 13. There’s still something inappropriate here, I think. Why should the backdrop of the popup have anything to do with the modal it is on top of? The popup should close, not the modal. If you add backdropClickToClose: false to the modal, but then set the variable of the same name to true for the popup, again, the background modal closes, not the popup.

How you can see -> if you open multiple modals or popups in the same view at the same time they are “stacked”.
Multiple backdrops are shown -> because of that the background gets darker if you open the popup over the modal.

For a mobile app this is not a good way for usability.
If you need to stack modals and popups or mixing them -> you should refactor your view/layout -> like move the content of the modal to a new view.

And the modal backdrop has the backdropClickToClose option -> and this puts an click event listener on the backdrop.
So this event goes through the popup backdrop to the modal backdrop.

I’ve been making use of modals instead of navigating to new views in a few areas in my apps and this works really well.

However, if this is the effect you’re trying to achieve I suggest you make your modals full screen modals, this may help with the issues you’re seeing.

Good luck :smile: