Skip to content

bug: Ion-menu does not open after navigating to a different page, with the same toolbar, and back 7.4.2 #28251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
HereIsNils opened this issue Sep 28, 2023 · 5 comments
Labels

Comments

@HereIsNils
Copy link

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

I have an ionic angular app with 2 pages, a dashboard and a detail page.
Both pages use the tool-bar component that includes an ionic toolbar with a button that opens a menu (i used the menu controller instead of the menu-button to log the open menus).
When i click the button in the dashboard the menu opens. Then i navigate to the detail view and click the button again and it opens. But the controller logs 2 menus:
(2) [ion-menu.md.menu-type-overlay.menu-side-end.hydrated, ion-menu.md.menu-type-overlay.menu-enabled.menu-side-end.hydrated]
even if i don't open the menu in the dashboard.
when i navigate back to the dashboard, the menu no longer opens when i click the button.

Expected Behavior

It would be expected that the menu still opens after i navigate back to the dashboard page.

Steps to Reproduce

  1. open the menu to verify it opens
  2. navigate to detail page
  3. open the menu to verify it opens (logs show 2 open menus)
  4. navigate back to dashboard
  5. open the menu -> it does not open

Code Reproduction URL

https://github.com/HereIsNils/testApp

Ionic Info

Ionic:

Ionic CLI : 7.1.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 7.4.2
@angular-devkit/build-angular : 16.2.4
@angular-devkit/schematics : 16.2.4
@angular/cli : 16.2.4
@ionic/angular-toolkit : 9.0.0

Capacitor:

Capacitor CLI : 5.4.1
@capacitor/android : not installed
@capacitor/core : 5.4.1
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 1.7.3

System:

NodeJS : v18.18.0 (/usr/local/bin/node)
npm : 9.8.1
OS : macOS Unknown

Additional Information

I'm aware of #27524 #22206 but this seems to be a different issue.

@ionitron-bot ionitron-bot bot added the triage label Sep 28, 2023
@HereIsNils
Copy link
Author

My current fix is to replace the <ion-router-outlet></ion-router-outlet> with the angular router outlet, then it works fine, but the ionic router provides some very useful implementations, which i would like to keep using.

@liamdebeasi liamdebeasi self-assigned this Sep 28, 2023
@liamdebeasi
Copy link
Contributor

Can you push your reproduction code? The sample provided is a blank starter application.

@liamdebeasi liamdebeasi added the needs: reply the issue needs a response from the user label Sep 28, 2023
@liamdebeasi liamdebeasi removed their assignment Sep 28, 2023
@ionitron-bot ionitron-bot bot removed the triage label Sep 28, 2023
@HereIsNils
Copy link
Author

I forgot to commit after setting the origin, my bad
Code is pushed now

@ionitron-bot ionitron-bot bot added triage and removed needs: reply the issue needs a response from the user labels Sep 28, 2023
@liamdebeasi liamdebeasi self-assigned this Oct 2, 2023
@liamdebeasi
Copy link
Contributor

liamdebeasi commented Oct 2, 2023

Thanks for providing the reproduction. I am going to close this as a duplicate of #18974.

@liamdebeasi liamdebeasi closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2023
@liamdebeasi liamdebeasi removed their assignment Oct 2, 2023
Copy link

ionitron-bot bot commented Nov 1, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants