Sidemenu seed project drops back button during navigation

I was playing around with the ionic sidemenu seed project and noticed an issue with the back button getting dropped during navigation.

Here’s the steps to reproduce after load:

  1. Click the menu toggle in the nav bar.
  2. Click on playlists
  3. Click on a playlist.

If you just clicked on a playlist normally, the back button would show. Opening the menu first causes it to stay hidden. It looks like this is caused by having nav-clear in the menu items, which works for other items, but clicking on the same item causes the nav state to get cleared and never recreated since the menu just toggles closed.

Curious if there’s a workaround for this or if it’s just a bug.

Thanks

Hm… It seems it also happens most frequently when you QUICKLY click on one of the list items. If you open the menu, tap “Playlists” and wait a sec THEN tap the list, you get the back button. however, this isn’t always the case.

Here’s a sample GIF of the problem in action for other’s to understand without setting up the project.

However, I’m not really sure that it’s a bug. The real question is “Why is the nav-clear on those menu items in the first place.?”

Nav-clear means “listen for the next state change and then blow out all history”. That’s exactly what’s happening.

I think it would just be more appropriate to NOT have the nav-clear on anything but a “Home” link in the menu.

Here’s also a link to try it out: http://plnkr.co/edit/0RXSDB?p=preview

The issue with removing nav-clear from those link is that the back button now sticks around when you click menu items. This behavior is a little odd since the clicking back goes back to the original menu items view. In reality, you’d want the back button cleared and a new history to start every time a menu item is clicked.

This also get you so very strange animation effect since the new view that comes in after clicking a menu item slides in when you really want it just to appear.

Same problem encountered. Can we make nav-clear clear all the history except current page?

I’ll get some feedback from the group on this. nav-clear was designed as a “destroy all history feature” - that was what the community requested.

So, I’ll see what the Ionic team thinks.

Andy says it’s fixed in the nightlies.

Finally got to give this a try. Looks good on my end.

Thanks for the fix!