-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Open
Labels
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
v8.x
Current Behavior
Screen.Recording.2025-01-10.at.7.20.11.PM.mov
Expected Behavior
Animation works as expected, for example when canDismiss is not specified
Screen.Recording.2025-01-10.at.7.21.08.PM.mov
Steps to Reproduce
create modal that has canDismiss specified as function that returns true
async function canDismiss(data?: any, role?: string) {
return true;
}
return (
<IonPage ref={page}>
<IonHeader>
<IonToolbar>
<IonTitle>App</IonTitle>
</IonToolbar>
</IonHeader>
<IonContent className="ion-padding">
<IonButton id="open-modal" expand="block">
Open
</IonButton>
<IonModal
ref={modal}
trigger="open-modal"
canDismiss={canDismiss}
presentingElement={presentingElement!}
>
<IonHeader>
<IonToolbar>
<IonTitle>Modal</IonTitle>
<IonButtons slot="end">
<IonButton onClick={() => dismiss()}>Close</IonButton>
</IonButtons>
</IonToolbar>
</IonHeader>
<IonContent className="ion-padding">
<p>
To close this modal, please use the "Close" button provided. Note
that swiping the modal will not dismiss it.
</p>
</IonContent>
</IonModal>
</IonContent>
</IonPage>
);Code Reproduction URL
https://stackblitz.com/edit/k9wbj9qc?file=src%2Fmain.tsx
Ionic Info
running in stackblitz
Ionic:
Ionic CLI : 5.4.16
Utility:
cordova-res : not installed
native-run : not installed
System:
NodeJS : v18.20.3
npm : 10.2.3
OS : Linux 5.0
Additional Information
No response
Reactions are currently unavailable