ionic-framework: bug: action sheet button handler triggered twice
Bug Report
Since ionic 5.2.0 the action sheet button handler is triggered twice (I just tested action sheet, maybe the same problem happens with other overlay buttons as well, e.g. ion-alert)
Ionic version:
[x] 5.2.0
Current behavior: Action sheet button handler triggered twice
Expected behavior: Action sheet button handler triggered only once
Related code:
public async presentHandleAttachmentActionSheet(): Promise<void> {
const actionSheetOptions: ActionSheetOptions = {
buttons: [
{
text: this.translationService.translate('action.delete'),
role: 'destructive',
handler: () => {
console.log('delete clicked');
}
},
{
text: this.translationService.translate('action.show'),
handler: () => {
console.log('open clicked');
}
},
{
text: 'cancel'
role: 'cancel'
}
]
};
const actionSheet = await this.actionSheetController.create(actionSheetOptions);
await actionSheet.present();
}
Console log is triggered twice in this example on click on one of the buttons
Ionic info:
Ionic:
Ionic CLI : 6.10.0 (/Users/pascalgraf/.nvm/versions/node/v12.11.1/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.2.0
@angular-devkit/build-angular : 0.803.25
@angular-devkit/schematics : 8.3.25
@angular/cli : 8.3.25
@ionic/angular-toolkit : 2.2.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 2.4.1, (and 26 other plugins)
Utility:
cordova-res (update available: 0.14.0) : 0.9.0
native-run (update available: 1.0.0) : 0.2.9
System:
Android SDK Tools : 26.1.1 (/Users/pascalgraf/Library/Android/sdk)
ios-deploy : 1.9.4
ios-sim : 8.0.2
NodeJS : v12.11.1 (/Users/pascalgraf/.nvm/versions/node/v12.11.1/bin/node)
npm : 6.13.7
OS : macOS Catalina
Xcode : Xcode 11.5 Build version 11E608c
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (8 by maintainers)
Thanks for the issue. This has been resolved via https://github.com/ionic-team/ionic/pull/21506, and a fix will be available in the next release of Ionic Framework.
I confirmed fix of double click at action-sheet👍
Thank you for confirmation. Is true! I also confirmed that it works fine on Safari and Capacitor iOS: https://github.com/ionic-team/ionic/issues/21499