bug: ion-modal `swipeToClose` no longer has any effect when `mode=ios` without `presentingElement`
See original GitHub issuePrerequisites
- 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
- v4.x
- v5.x
- v6.x
- Nightly
Current Behavior
Using swipeToClose
on modals no longer works unless using the new card
style modal. We had previously used this function even on normal modals to allow users to swipe and dismiss.
Expected Behavior
swipeToClose
should stay available without presentingElement
. (Note, I see this is deprecated, but the functionality has been removed in a breaking way and it would be nice if this could stay available (not just for the new card-style modals.)
Steps to Reproduce
Create a modal that does not have a presentingElement
(e.g. just a plain modal, not a card, not a bottom-sheet).
this.modal = await this.modalCtrl.create({
component: MyModalComponent,
swipeToClose: true,
showBackdrop: true,
animated: true,
mode: 'ios',
});
The modal will display but not be swipable. This previously worked in Ionic 6.1.1 but is now broken in 6.1.7.
Working 6.1.1: https://user-images.githubusercontent.com/362329/170589579-22176427-8a7c-4a2a-abb6-675f3f7765c8.mov
Broken 6.1.7: https://user-images.githubusercontent.com/362329/170589426-a23668cc-6a28-4361-b23e-da29bb0dfcfd.mov
Code Reproduction URL
No response
Ionic Info
mshark:topdecked-unified lincoln$ ionic info [WARN] Error loading @ionic/angular package.json: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath β./packageβ is not defined by βexportsβ in /Users/lincoln/projects/maritlabs/topdecked-unified/node_modules/@ionic/angular/package.json
Ionic:
Ionic CLI : 6.19.0 (/Users/lincoln/.nvm/versions/node/v14.19.0/lib/node_modules/@ionic/cli) Ionic Framework : not installed @angular-devkit/build-angular : 14.0.0-rc.2 @angular-devkit/schematics : 14.0.0-rc.2 @angular/cli : 14.0.0-rc.2 @ionic/angular-toolkit : 6.1.0
Capacitor:
Capacitor CLI : 3.4.3 @capacitor/android : 3.4.3 @capacitor/core : 3.4.3 @capacitor/ios : 3.4.3
Utility:
cordova-res : not installed globally native-run (update available: 1.6.0) : 1.5.0
System:
NodeJS : v14.19.0 (/Users/lincoln/.nvm/versions/node/v14.19.0/bin/node) npm : 6.14.16 OS : macOS Monterey
βββββββββββββββββββββββββββββββββββββββββββββββββ
Ionic CLI update available: 6.19.0 β 6.19.1
Run npm i -g @ionic/cli to update
βββββββββββββββββββββββββββββββββββββββββββββββββ
mshark:topdecked-unified lincoln$
Additional Information
No response
Issue Analytics
- State:
- Created a year ago
- Comments:31 (11 by maintainers)
Top GitHub Comments
Sounds good to me π Closing this. Much appreciated for everything as always, Liam.
Right, just had to say it out loud π