bug: modal, popover dismiss when ion-select is dismissed
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
Current Behavior
I have a modal page with some inputs and drop-downs (ion-selects). When I click to the OK button after selecting an option, the click triggers the modal dismiss.
I could catch the event on the event listener:
const modal = await this._modalCtrl.create({
component: RecordEditPage,
...
});
modal.onDidDismiss().then(() => {
console.error('dismissed'); // I see it on the console
});
await modal.present();
When I set the canDismiss
property to false, the modal works as expected, but I can’t close it through this._modalCtrl.dismiss();
Expected Behavior
Don’t close the modal on ion-select changes.
Steps to Reproduce
Create a component with some ion-select input. Open the modal with the modalController.
Code Reproduction URL
No response
Ionic Info
Ionic:
Ionic CLI : 6.19.0 Ionic Framework : @ionic/angular 6.1.0 @angular-devkit/build-angular : 13.3.2 @angular-devkit/schematics : 13.3.2 @angular/cli : 13.3.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 : 0.15.4 native-run : 1.5.0
System:
NodeJS : v14.17.0
npm : 8.6.0
OS : macOS Monterey
Additional Information
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:12 (6 by maintainers)
Top GitHub Comments
A fix for this has been released in Ionic v6.1.1.
Here is a repro on JS ionic https://codepen.io/vicb-the-lessful/pen/yLpRjwx
Can’t wait for the fix and thanks for reacting quickly !