mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 05:58:26 +08:00
fix(modal): backdrop click catches navigation promise
A modal with canLeave = false, can lead to an unhandled exception when closing through a click in the backdrop
This commit is contained in:
@ -75,7 +75,9 @@ export class ModalCmp {
|
||||
|
||||
_bdClick() {
|
||||
if (this._enabled && this._bdDismiss) {
|
||||
return this._viewCtrl.dismiss(null, 'backdrop');
|
||||
return this._viewCtrl.dismiss(null, 'backdrop').catch(() => {
|
||||
console.debug('Dismiss modal by clicking backdrop was cancelled');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user