Rewind (!) back - not just $.mobile.changePage
History of my pages / activities is:
- Home page (page0).
- List of issues (page1).
- Detail card of issue (page2).
- Popup for confirmation to delete issue (not a page because of JQM popup isn't a page).
When I confirm deletion of issue and delete it, there is no reason to return back to page2 (it's content dropped). The only valid transition here - from popup to list of issues (back twice).
BUT.
When I jump from popup to page1 by $.mobile.changePage, history saves page2 as previous page.
So, when I press back on page1 I expect to return on page0, but returns to page2 which is invalid.
Guess valid behaviour here is:
- Jump from popup to page1.
- Erase page2 and popup from history at all.
How to do it?