Skip to content

bug: navigating with multiple split panes causes first menu to never be reactivated #18683

Closed

Description

@yogeshshsf

Hi. i am using 2 split-pane, firstmenu/firstpage will be my home screen. from firstpage i am navigating to secondmenu/secondpage. now when i return back to firstmenu/firstpage, the split-pane is getting hide, can someone help me on this please. see the screenshot and code below.

firstmenu/firstpage:

image

secondmenu/secondpage:

image

firstmenu/firstpage:

image

Below is the github repository to test this:

https://github.com/yogeshshsf/SplitpaneDemo

Activity

  1. yogeshshsf commented on Jul 1, 2019

    @yogeshshsf
    Author

    Hi. i am using 2 split-pane, firstmenu/firstpage will be my home screen. from firstpage i am navigating to secondmenu/secondpage. now when i return back to firstmenu/firstpage, the split-pane is getting hide, can someone help me on this please. see the screenshot and code below.

    Members
    0
    18 posts
    Report post
    Posted May 29 (edited)
    Hi simon. i am using 2 split-pane, firstmenu/firstpage will be my home screen. from firstpage i am navigating to secondmenu/secondpage. now when i return back to firstmenu/firstpage, the split-pane is getting hide. this is stopper for my application, can you help on this please. see the screenshot and code below.

    firstmenu/firstpage:

    image

  2. liamdebeasi commented on Jul 2, 2019

    @liamdebeasi
    Contributor

    Thanks for the issue. I think this problem stems from the fact that we only allow 1 menu to be enabled at a time. If you want these two side panes to be always be open, I would recommend wrapping them in something other than ion-menu.

    In your demo repo, I wrapped them each in a div rather than an ion-menu and the issue disappeared. Can you try this and let me know if it works for your use case?

    If you really need to use ion-menu, I would recommend only having 1 instance of the menu.

  3. added
    needs: reply
    on Jul 2, 2019
  4. added and removed
    needs: reply
    on Jul 2, 2019
  5. added
    needs: reply
    on Jul 8, 2019
  6. eduardoRoth commented on Jul 12, 2019

    @eduardoRoth
    Contributor

    Issue happens even if only using one ion-menu; @liamdebeasi your quick fix works, if I replace ion-menu tag with a div one, split pane is always shown.

  7. added and removed
    needs: reply
    on Jul 12, 2019
  8. yogeshshsf commented on Jul 17, 2019

    @yogeshshsf
    Author

    @liamdebeasi thanks for you help, its much appreciated. it works perfect when you use div..

  9. eduardoRoth commented on Jul 24, 2019

    @eduardoRoth
    Contributor

    When using div tag instead of ion-menu; tags ion-content and ion-footer don't work as expected.

  10. iamkinetic commented on Aug 7, 2019

    @iamkinetic

    @liamdebeasi are you saying we should have no more than one menu in an application or we may run into problems even if only one of them is shown at one time?

  11. 7 remaining items

  12. added
    type: bug
    on Oct 13, 2020
  13. thomaux commented on Apr 6, 2023

    @thomaux

    I fixed this by replacing the <ion-menu> with a div as mentioned before. Then, in order to make <ion-header> and <ion-content> work properly inside that div, I applied flex-direction: column; to the div. Hope this helps!

  14. cra1gs commented on Apr 14, 2023

    @cra1gs

    I fixed this by replacing the <ion-menu> with a div as mentioned before. Then, in order to make <ion-header> and <ion-content> work properly inside that div, I applied flex-direction: column; to the div. Hope this helps!

    If you use this method, how does your menu toggle work on smaller screens? My burger menu will not appear, so you cannot access the menu.

  15. thomaux commented on Apr 14, 2023

    @thomaux

    @cra1gs this is how I ended up using the split-pane:

    <ion-split-pane when="xs" contentId="location-specifics" [disabled]="closeMenu$ | async">
      <div>
        <ion-content>
          <ion-list>
            ...menu content here
          </ion-list>
        </ion-content>
      </div>
    
      <ion-router-outlet id="location-specifics"></ion-router-outlet>
    </ion-split-pane>
    export class SplitPanePage {
    
      closeMenu$ = this.store.selectedItem$.pipe(
        map((val) => val && window.innerWidth <= 576),
      );
    }
    @media (max-width: 576px) {
      ion-split-pane {
        --side-min-width: 100%;
      }
    }

    The basic premise of the above is: when an item is selected AND the screen is smaller than the SM breakpoint (=576px), disable the split screen so the "menu" is not shown. In case no item is selected, only the menu is shown as the when property is set to xs and I've set the side minimum width to 100% for screen widths lower then the SM breakpoint

  16. added
    type: bug
    and removed
    type: bug
    on Oct 5, 2023
  17. liamdebeasi commented on Oct 17, 2023

    @liamdebeasi
    Contributor

    Hi everyone,

    Here is a dev build with a proposed fix if anyone is interested in testing: 7.5.1-dev.11697568647.1ac87d08

    Install Example: npm install @ionic/[email protected]

  18. added a commit that references this issue on Oct 19, 2023
    5a30082
  19. liamdebeasi commented on Oct 19, 2023

    @liamdebeasi
    Contributor

    Thanks for the issue. This has been resolved via #28370, and a fix will be available in an upcoming release of Ionic Framework. Please feel free to keep testing the dev build, and let me know if you run into any problems.

  20. added a commit that references this issue on Oct 27, 2023
    1c7305d
  21. ionitron-bot commented on Nov 18, 2023

    @ionitron-bot

    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.

  22. locked and limited conversation to collaborators on Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: coretype: bug

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions