You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a certain use case where I need to use IonSlides within a IonModal. The documentation states that it is necessary to contain the IonSlides within an IonContent. However, when I do this, I am unable to SwipeToClose the modal when I'm in ios mode. When I remove the IonContent tag from within the modal, I am able to swipe the modal closed.
Expected behavior:
I expect to be able to use an IonContent within an IonModal and should be able to swipeToClose when in ios mode.
Related code:
<IonModal
isOpen={true}
swipeToClose
mode="ios"
>
{/* Remove this IonContent and you'll be able to swipe to close */}
<IonContent>
</IonContent>
</IonModal>
Thanks for the issue. I am going to close this as this is not a bug in Ionic Framework. The swipe to close modal requires that you swipe to close from the header, so modals that do not have a header cannot be swiped.
There is a PR open that lets you swipe from the content, but it involves some hacks so it needs work before it gets merged: #21227.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Bug Report
Ionic version:
[x] 5.2.2
I have a certain use case where I need to use
IonSlides
within aIonModal
. The documentation states that it is necessary to contain theIonSlides
within anIonContent
. However, when I do this, I am unable toSwipeToClose
the modal when I'm inios
mode. When I remove theIonContent
tag from within the modal, I am able to swipe the modal closed.Expected behavior:
I expect to be able to use an
IonContent
within anIonModal
and should be able toswipeToClose
when inios
mode.Related code:
Here's a github repo: https://github.com/uncvrd/ionic-modal-content-s2c
Home.tsx
.ionic serve
.IonContent
, reload, and now you'll be able to swipe to closeIonic info:
The text was updated successfully, but these errors were encountered: