Skip to content
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

bug: Issue with Disabling Menu Using MenuController in Ionic 8 (Standalone Project) #29824

Closed
3 tasks done
rasheeek opened this issue Sep 2, 2024 · 2 comments
Closed
3 tasks done
Labels

Comments

@rasheeek
Copy link

rasheeek commented Sep 2, 2024

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

The menu is supposed to be disabled using the MenuController. Despite implementing this.menuCtrl.enable(false) in the appropriate lifecycle hooks (ionViewWillEnter, ngOnInit), the menu remains accessible and can be opened by swiping or clicking the menu button.

Expected Behavior

The menu should be completely disabled, preventing any interaction with it. The menu should not be accessible through swiping or by using the menu button.

Steps to Reproduce

  1. Create a new Ionic Angular application with a side menu.
  2. Create a page where the menu should be disabled.
  3. Implement this.menuCtrl.enable(false) in ionViewWillEnter and ngOnInit within the page
  4. Run the application and navigate to the page.
  5. Observe that the menu is still accessible despite the attempt to disable it.

Code Reproduction URL

https://github.com/rasheeek/ionic-side-menu

Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/Users/rasheek/.nvm/versions/node/v20.16.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.2.7
@angular-devkit/build-angular : 18.2.2
@angular-devkit/schematics : 18.2.2
@angular/cli : 18.2.2
@ionic/angular-toolkit : 11.0.1

Capacitor:

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

Utility:

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

System:

NodeJS : v20.16.0 (/Users/rasheek/.nvm/versions/node/v20.16.0/bin/node)
npm : 10.8.1
OS : macOS Unknown

Additional Information

I see this issue is addressed on ionic 7.5.1 version (#28337)
Anyway I am trying it in latest application with standalone angular project and it doesn't work

@ionitron-bot ionitron-bot bot added the triage label Sep 2, 2024
@rasheeek
Copy link
Author

rasheeek commented Sep 9, 2024

Not. a bug, should be imported from @ionic/angular/standalone
Clarified in #29734

@rasheeek rasheeek closed this as completed Sep 9, 2024
Copy link

ionitron-bot bot commented Oct 9, 2024

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 Oct 9, 2024
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

1 participant