mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 18:17:31 +08:00
feat(): add ability to continue processing hardware back button events (#20613)
fixes #17824
This commit is contained in:
@ -37,7 +37,10 @@ export default class Router extends VueRouter {
|
||||
|
||||
// Listen to Ionic's back button event
|
||||
document.addEventListener('ionBackButton', (e: Event) => {
|
||||
(e as BackButtonEvent).detail.register(0, () => this.back());
|
||||
(e as BackButtonEvent).detail.register(0, processNextHandler => {
|
||||
this.back();
|
||||
processNextHandler();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user