octicon-rss(16/)
You've already forked ionic-framework
mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
fix(menu): allow ssr to work properly with hardware back button updates (#20629)
This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
committed by
GitHub
gitea-unlock(16/)
parent
11d8c14d72
commit
fe8d74d08c
octicon-diff(16/tw-mr-1) 1 changed files with 11 additions and 9 deletions
@@ -207,8 +207,9 @@ const createMenuController = () => {
|
|||||||
registerAnimation('push', menuPushAnimation);
|
registerAnimation('push', menuPushAnimation);
|
||||||
registerAnimation('overlay', menuOverlayAnimation);
|
registerAnimation('overlay', menuOverlayAnimation);
|
||||||
|
|
||||||
const doc: Document = document;
|
/* tslint:disable-next-line */
|
||||||
doc.addEventListener('ionBackButton', (ev: any) => {
|
if (typeof document !== 'undefined') {
|
||||||
|
document.addEventListener('ionBackButton', (ev: any) => {
|
||||||
const openMenu = _getOpenSync();
|
const openMenu = _getOpenSync();
|
||||||
if (openMenu) {
|
if (openMenu) {
|
||||||
(ev as BackButtonEvent).detail.register(MENU_BACK_BUTTON_PRIORITY, () => {
|
(ev as BackButtonEvent).detail.register(MENU_BACK_BUTTON_PRIORITY, () => {
|
||||||
@@ -216,6 +217,7 @@ const createMenuController = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
registerAnimation,
|
registerAnimation,
|
||||||
|
|||||||
Reference in New Issue
Block a user