Skip to content

[4.0.0-beta.16] ion-router-outlet issue tabs split-pane navigation broken / stops working #16411

Closed

Description

@paulstelzer

Describe the Bug
If you have a project with different layouts (with splitpane / without or another), pages with the same splitpane layout will not work. It's hard to describe, so I've added a repository (see below) and a gif:

2018-11-21_15-23-59

Steps to Reproduce

  1. Click on "Open Dashboard". The splitpane appears.
  2. Click on "Page 1" - everything is working
  3. Click on "Fullscreen" and go back by tapping on "Open Dashboard".
  4. Now try to open "Page 1" or "Page 2" again - it's not working
  5. If I go back to home and open this route again, it's working until I leave the route, open a page with another layout and the same issue comes back

Related Code
https://github.com/paulstelzer/test-splitpane

Activity

  1. romain10009 commented on Nov 26, 2018

    @romain10009

    @paulstelzer I have the same issue, I have a split pane, I login, i logout, now all the split pane overlaps the app, the issue seems to be with the .menu-content-open
    image
    As a temporary workaround, you can set

    .menu-content-open{
      pointer-events: unset!important;
    }
    
  2. paulstelzer commented on Nov 30, 2018

    @paulstelzer
    ContributorAuthor

    Found a workaround (or maybe this will be the one and only working solution):

    I removed the <ion-router-outlet> from app.component.html - so only one ion-router-outlet exist and then it's working. But another problem occurs now: Switching the pages will not close the menu and so the menu is always in front and has to be closed on mobile. For this I subscribe to the router events and when NavigationEnd i close the menu

  3. urbanjoe commented on Dec 14, 2018

    @urbanjoe

    @paulstelzer: Just gave it a shoot, but'll get a router-outlet destroyed message in the console running our repo:

    dummy_test

  4. paulstelzer commented on Dec 14, 2018

    @paulstelzer
    ContributorAuthor

    @urbanjoe it's correct that you see the router-outlet destroyed message because I am destroy it (one page with sidebar -> going to fullscreen without sidebar, so the router oulet has to be destroyed). I make you a branch with a router-outlet destroyed and the navigation will still work ;) one moment

  5. paulstelzer commented on Dec 14, 2018

    @paulstelzer
    ContributorAuthor

    @urbanjoe Is mentioned above I added an ISSUE, so my repo isn't working of course ;)

    I added a new branch WORKING -> https://github.com/paulstelzer/test-splitpane/tree/working

    This includes my workaround described here -> #16411 (comment)

    As you can see there is still the router-outlet destroyed, but this is CORRECT, because I destroy the ion-router-outlet if I change from one page to another. But as you can still see: the navigation is working ;)

    2018-12-14_14-46-26

  6. MattiLehtinen commented on Dec 15, 2018

    @MattiLehtinen

    Could it be rather ion-router-outlet related than split pane related issue? I have similar problem and the problem exists when removing split pane (but not another ion-router-outlet) and navigating using navController.navigateRoot or navController.navigateForward.

    I can confirm that replacing <ion-router-outlet> on app.component.html with <router-outlet> works as a workaround.

    Code to reproduce with split pane commented out: https://github.com/MattiLehtinen/ion-router-outlet-test

  7. paulstelzer commented on Dec 16, 2018

    @paulstelzer
    ContributorAuthor

    @MattiLehtinen I think so, too that the root cause is ion-router-outlet. Many people describe this problem with ion-tabs (where ion-router-outlet is inside), too. I adjust the title of this issue

  8. changed the title [-][4.0.0-beta.16] split-pane issues[/-] [+][4.0.0-beta.16] ion-router-outlet issue with tabs or split-pane when switching the root component[/+] on Dec 16, 2018
  9. added
    package: angular
    on Dec 16, 2018
  10. MattiLehtinen commented on Dec 16, 2018

    @MattiLehtinen

    Noticed that navigation with NavController seems to work as long as you navigate using navigateForward(). When using navigateRoot() it stops working and console says router-outlet destroyed.

  11. paulstelzer commented on Dec 16, 2018

    @paulstelzer
    ContributorAuthor

    Take a look into the DOM, you will see that on navigateRoot the component will removed from the DOM and so it's correct that router-outlet destroyed will logged ;) On navigateForward, the page will be hidden ( router-outlet is still there)

  12. Eraldo commented on Dec 16, 2018

    @Eraldo

    Sadly I cannot confirm the workaround. :|
    Does not seem to do the trick for my use case.

  13. changed the title [-][4.0.0-beta.16] ion-router-outlet issue with tabs or split-pane when switching the root component[/-] [+][4.0.0-beta.16] ion-router-outlet issue tabs split-pane navigation broken / stops working[/+] on Dec 16, 2018
  14. paulstelzer commented on Dec 16, 2018

    @paulstelzer
    ContributorAuthor

    That's no problem. We have maybe a fix for it and will test it with beta.19 which I hope will coming soon :)

  15. added a commit that references this issue on Dec 17, 2018
    8bb634d
  16. added a commit that references this issue on Dec 17, 2018
    35e3848
  17. ionitron-bot commented on Jan 16, 2019

    @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.

  18. locked and limited conversation to collaborators on Jan 16, 2019
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: angular

    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