Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: closeMenu directive affect the next view even when the view dosen't need to change #4145

Closed
sharvit opened this issue Jul 25, 2015 · 2 comments

Comments

@sharvit
Copy link

sharvit commented Jul 25, 2015

Type: bug

Platform: all

Hi :)

The first very problematic use-case is when the SideMenu contain a link to the current view.
At this use-case the SideMenu will close and the view will not change.
BUT!!
After i click on a link inside my current view, it make the next view as a RootView and i don't have a back button.

This bug will happen for all elements that contain MenuClose and not change the next view.

<ion-side-menu side="left">
  <ion-content>
    <ion-list>
      <!-- Close the menu but the next view (whatever it will be) going to be to RootView -->
      <ion-item menu-close>
        Close The Menu
      </ion-item>
      <!-- Close the menu but the next view (whatever it will be) going to be to RootView -->
      <ion-item  menu-close href="#/current-view">
        Link to my current view
      </ion-item>
      <!-- The only use-case it will work well -->
      <ion-item menu-close href="#/another-view">
        Work Well
      </ion-item>
    </ion-list>
  </ion-content>
</ion-side-menu>

The problem is here:
https://github.com/driftyco/ionic/blob/master/js/angular/directive/menuClose.js#L1

Need to check that the view are actually going to change before setting the next view as the root view.

Thank you for this amazing platform 👍

@sharvit sharvit changed the title closeMenu directive affect the next view even when the view dosen't need to change bug: closeMenu directive affect the next view even when the view dosen't need to change Jul 25, 2015
@stan-kondrat
Copy link

same #4038

@mhartington
Copy link
Contributor

Closing as a duplicate of #4132

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants