I’ve tried with getTop() but it is the only visible modal.
And I’ve also tried adding an id and specifying it when trying to close the modal, but nothing.
That’s exactly what canDismiss is for. If you set it to false you can’t dismiss the modal.
Why are you setting it to false? In case where the modal should be be dismissed until some actiom happened for example you have to update the property to true before you dismiss it.
But it’s strange how it works, isn’t it? I mean, I’m not supposed to let the user close the modal but I want to close it via code when the user does what I want, no?
I thought canDismiss was the “alternative” to the deprecated swipeToClose because if I set canDismiss to true, but backdropDismiss to false the user can close the modal via swipe.
I will investigate how to change the value from the modal when the user performs the requirements I need.