How to prevent modal close when child popup element gets a click event outside itself

I have an ionicmodal that has an ionicpopup button within it. The modal needs to stay open in the background while the popup opens over it. currently if I click in the shaded area outside the popup the modal will close behind it. Is their a way to prevent this behavior?

ionicModal has an option to avoid closing the modal when the backdrop is clicked: