mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
fix(): handle failure in hardware back button
This commit is contained in:
@ -19,7 +19,7 @@ export function createOverlay<T extends HTMLIonOverlayElement>(element: T, opts:
|
||||
// append the overlay element to the document body
|
||||
getAppRoot(doc).appendChild(element);
|
||||
|
||||
doc.body.addEventListener('ionBackButton', ev => {
|
||||
doc.addEventListener('ionBackButton', ev => {
|
||||
(ev as BackButtonEvent).detail.register(100, () => closeTopOverlay(doc));
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user