[RC2] <ion-menu type="overlay"> frequently closes by itself
See original GitHub issueShort description of the problem:
I have an <ion-menu>
in app.html
that, when opened, frequently closes by itself almost instantly (note: it doesn’t happen all the time, but at the very least about ~50% of the time). This was previously working as expected before the RC2 update.
What behavior are you expecting?
I’m expecting my side menu to close only when I tap on one of the links in the side menu, or when clicking on the background overlay.
Steps to reproduce:
- Create an
<ion-menu>
overlay in an app.html file - Have a button that toggles the ion menu open.
- Watch it close by itself sometimes?
This is my app.html
:
<ion-menu [content]="content" type="overlay" class="sidebar">
<ion-content class="sidebar-content">
<img class="sidebar-logo" src="assets/img/general/white-logo.svg">
<ion-list class="sidebar-list">
<button ion-item menuClose *ngFor="let link of links" (click)="goToPage(link.pageObj)" class="sidebar-item">
{{ link.title }}
</button>
<button ion-item menuClose (click)="logout()" class="sidebar-item">
Log Out
</button>
</ion-list>
</ion-content>
</ion-menu>
<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
This is my dashboard.html
page that contains the menu icon that opens the Menu:
<ion-header class="header">
<ion-navbar hideBackButton="true">
<ion-title>{{ pageTitle }}</ion-title>
<button ion-button icon-only menuToggle right>
<ion-icon name="menu"></ion-icon>
</button>
</ion-navbar>
</ion-header>
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
This seems to have happened with one of the code changes after RC1 was released, because this was working when I was on RC1.
Let me know if there’s anything else I can share that may help with this issue! It might sound weird but I didn’t make any coding changes for this to happen…
Which Ionic Version?
2.0.0-rc.2
Run ionic info
from terminal/cmd prompt:
Cordova CLI: 6.1.1
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v6.3.1
Xcode version: Xcode 7.3.1 Build version 7D1014
Issue Analytics
- State:
- Created 7 years ago
- Comments:21 (4 by maintainers)
same issue here, thanks for reporting it so I didn’t have to 👍
Actually yes. I am seeing the same behavior. It takes several seconds before the menu will close via clicking outside. Menu toggle buttons work fine.