question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: ion-menu-button is not hidden when using SplitPane

See original GitHub issue

Bug Report

Ionic version:

[x] ~4.5.x

Current behavior:

Ion-menu-button is not hidden when using SplitPane. The icon is not displayed like the image, but the width(48px) for the icon has been present.

Screen Shot 2019-06-29 at 13 26 12

Expected behavior:

Please execute the following command. Up to v 4.4.0 was displayed as below.

Screen Shot 2019-06-29 at 13 32 15

Steps to reproduce:

ionic start test-sidemenu sidemenu
cd test-sidemenu 
ionic serve

Please see the launched application on your PC.

Related code:

This code seems to be the cause.

https://github.com/ionic-team/ionic/blob/45b82dc466e3b5a9cc020456c224a45ef8dff0c5/core/src/components/menu-button/menu-button.md.scss#L14

There is no issue if you write CSS as follows.

:host {
  button {
    width: 48px;
    height: 48px;
  }
}

Other information:

I want to fix this issue!

I’ve committed the fix for this issue to my forked repository. If there is no problem I want to create a pull request with the same one! https://github.com/scrpgil/ionic/commit/ee4716a6db9755b81ffbb91f1445bc550edbba51

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
brandyscarneycommented, Jul 3, 2019

@joelmeaders The reason your workaround fixes it is because the ion-menu-toggle has the logic to hide / show based on the split pane / menu being active. The menu button has a child ion-menu-toggle so that is working to hide the inner button but the host element is still visible.

I moved the logic up so the ion-menu-button will be able to handle this for itself instead of relying on the child ion-menu-toggle. This will be better for accessibility too so the menu-button can get aria-hidden on the host element instead. Here is the PR for this: https://github.com/ionic-team/ionic/pull/18702

0reactions
ionitron-bot[bot]commented, Aug 2, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: ion-menu-button is not hidden when using SplitPane ...
Ion-menu-button is not hidden when using SplitPane. The icon is not displayed like the image, but the width(48px) for the icon has been...
Read more >
Ion-menu-button not working on website mode - Ionic Angular
By default, the split pane will expand when the screen is larger than 992px. And the ion-menu will always be displayed and cannot...
Read more >
Ionic menu show after toggle but not clickable - Stack Overflow
Background: I have an ionic project setup with side menu in split pane. It was structured with a separate ionic page for the...
Read more >
Building a Flexible UI with Ionic Split Pane - YouTube
Learn to use the Ionic Split Pane to build a flexible Ui for different screen sizes as well as a collapsible function for...
Read more >
Ion-menu button not toggling
EDIT: If you don't want to use ion-menu-toggle, you can do this instead: In ... as a split-pane, the menu is marked as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found