bug & fix: ion-split-pane not allow click in ion-menu (Vue.js)
See original GitHub issueBug Report
Ionic version: [x] 4.x
Current behavior: When you use ion-split-pane with ion-menu inside can’t click on elements and click on next layer instead ion-menu layer.
Expected behavior: Element click as expected
Steps to reproduce: Try to use ion-split-pane with ion-menu normally.
Related code:
<ion-split-pane class="indexTopMenu" id="main-content">
<menu-lateral />
</ion-split-pane>
MenuLateral.vue:
<template>
<ion-menu class="menuOptions" type="overlay" side="start" content-id="main-content">
<ion-content padding>
/* Insert what you want here as button or anything else */
</ion-content>
</ion-menu>
</template>
Other information: How to fix: CSS: .menu-content-open { pointer-events: unset !important; }
If z-index show behind main layer use this option: .menu-content.menu-content-open { z-index: 20; }
Ionic info:
Ionic:
Ionic CLI : 5.2.7 (C:\Users\Pablo\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/vue 0.0.9
Vue:
@ionic/vue: 0.0.9 => 0.0.9
Utility:
cordova-res : 0.6.0
native-run : 0.2.8
System:
NodeJS : v12.8.0 (C:\Program Files\nodejs\node.exe)
npm : 6.10.2
OS : Windows 10
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
bug & fix: ion-split-pane not allow click in ion-menu (Vue.js ...
When you use ion-split-pane with ion-menu inside can't click on elements and click on next layer instead ion-menu layer. Expected behavior:
Read more >Problem with tabs and shared ion-menu - Ionic Vue
Hi, I'm trying to set up a common ion-menu for every tab in a tab-based interface. I've added the same menu to each...
Read more >Newest 'ion-menu' Questions - Stack Overflow
I am having a bug with IonMenu (Ionic React v5.0.7 + Capacitor 2.2.0)... even when I put "onClick" handlers it aren´t working (not...
Read more >How to Create an Ionic Side Menu with Accordion Items
Learn to implement and Ionic side menu with accordion component and routing - plus a dynamic way with recursion! Learn Ionic...
Read more >Ionic Forum - Latest topics - RSSing.com
<ion-split-pane> <ion-menu contentId="sideMenu" type="overlay"> ... move to a tab and trigger ionChange from the base page it give me error.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@PabloGBarcelo Thanks for the follow up. I took a look at your repo, and it looks like this bug is occurring because you are using
ion-split-pane
incorrectly. I changed the following things, and the app is now working correctly:ion-menu-controller
does not needcontent-id
.main-content
.ion-split-pane
needs to havecontent-id
, notid
.ion-split-pane
component.The new template should look like:
You will likely need to add
width: 100%
to your main content as well. For further help implementing your app, I recommend looking at the following resources:ion-split-pane Documentation Ionic Forums Ionic Slack
I am going to close this issue. Thanks!
As I suspected I was using menu wrong; checked the side menu example and my issue was caused by a wrong contentId on the menu. So You can disregard my comments related to this, thank you 😃