Open
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v7.x
Current Behavior
When the canDismiss
callback returns false
the overlay layer is dismissed and the user can interact again with the modal. If the user tries to close it again the canDismiss
callback callback is no longer called.


The Modal is opened in this way:
present({ canDismiss: canDismiss})
Expected Behavior
If the user does not wish to close the modal, canDismiss must return false. But the user should be allowed to close the modal at a later time.
Steps to Reproduce
- Open an IonModal using the hook
useIonModal
- Provide a canDismiss function which returns
resolve(false)
if the user doesn't want to close the modal - Close the modal using the
dimiss
function - Refuse to close the modal and the overlay layer will disappear
- Call the
dismiss
again - Nothing happens
Code Reproduction URL
No response
Ionic Info
I have an error running it linked to the macOS:
TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
Additional Information
No response