Skip to content

bug: Disabling menu doesn't work since last npm update #28366

@telpat0298

Description

@telpat0298

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

Im using the ion-menu tag together with the ion-menu-toggle for the side menu in our application. On certain pages i don't want to display the menu and the menu toggle. Therefore I'm using the MenuController to enable/disable the menu programatically with this.menu.enable(false, "main-menu"); inside the ngInit and viewWillEnter hooks. Since the last npm update disabling the menu with this.menu.enable(false, "main-menu"); has no effect. The button is still visible and the menu can be swiped open. I've create this stackblitz to recreate the issue.

Expected Behavior

The menu should not be swipable and the menu toggle should be hidden when disabled.

Steps to Reproduce

Stackblitz

Code Reproduction URL

this

Ionic Info

Ionic:

Ionic CLI : 7.1.1 (/opt/homebrew/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 7.5.0
@angular-devkit/build-angular : 16.2.6
@angular-devkit/schematics : 16.2.6
@angular/cli : 16.2.6
@ionic/angular-toolkit : 10.0.0

Capacitor:

Capacitor CLI : 5.5.0
@capacitor/android : 5.5.0
@capacitor/core : 5.5.0
@capacitor/ios : 5.5.0

Utility:

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

System:

NodeJS : v18.17.0 (/opt/homebrew/Cellar/node@18/18.17.0/bin/node)
npm : 9.8.1
OS : macOS Unknown

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions