Skip to content
This repository has been archived by the owner on Apr 24, 2019. It is now read-only.

Navigation logic with back button #68

Open
berthojoris opened this issue Oct 8, 2013 · 3 comments
Open

Navigation logic with back button #68

berthojoris opened this issue Oct 8, 2013 · 3 comments

Comments

@berthojoris
Copy link

The problem that has always experienced is the navigation on the page . If I click on the back button then all pages will I ever go back again .
For example in the case of :

Page A - > Open Page B - > Back to page A - > Open Page C - > Back to page A

When I was in this position , then I navigate using the back button then there is

Page A - > back button click - > Page C - > back button click - > Page A - > back button click - > Page B - > back button click Page A.

How best to cope with this ?

If it should be on page A then when the back button is pressed, the application will not repeat history open pages you had open .
For example :

Page A - > Open Page B - > Back to page A - > Open page C - > Back to page A

When I press the back button then the app will bring up a dialog to close the application . Or at the time of my position on Page C then when I press the back button then page A will be called and if I press the back button once again then the application will bring up a dialog to close applications

@jaunesarmiento
Copy link
Owner

Related to #68. Thanks for bringing this up. Will work on this along with issue #68. I'm looking for a few ways to implement this. I'm thinking of adding a data-attribute to the .page that tells stack.js that the page is at root level and should clear the history when it's encountered. What do you think?

@berthojoris
Copy link
Author

I have not tried the solution you gave. It seems to run well if we give ID to every page that will be on the go. Have you tried it?

@jaunesarmiento
Copy link
Owner

It's not yet a solution, @berthojoris. I'm just throwing in ideas on how to tackle this problem. Are you sure it's the device's back button and not the "up" button?

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

2 participants