adapt_framework icon indicating copy to clipboard operation
adapt_framework copied to clipboard

Adapt.location._previousContentType not working correctly after you navigate backwards

Open andrewhosgood opened this issue 11 years ago • 2 comments

  1. Start on a menu

  2. Navigate "forward" to a page (A):

    Adapt.location._contentType = "page"
    Adapt.location._previousContentType = "menu"
    
  3. Navigate "forward" to another page (B):

    Adapt.location._contentType = "page"
    Adapt.location._previousContentType = "page"
    
  4. Go back to page A:

    Adapt.location._contentType = "page"
    Adapt.location._previousContentType = "page" // Incorrectly reporting type of page B
    

After navigating backwards, the _previousContentType outputs the type of the "next" (the last viewed) page in the history rather than the actual previous page in the stack.

Could we leverage the HTML5 history API that Backbone uses to store the page type and previous page type when navigating so when you update location, the data about what came before was available?

I was logging this out on Adapt.on( 'router:location', function() { ... } );

andrewhosgood avatar Oct 20 '15 10:10 andrewhosgood

this is really old now, do you know if this is still an issue?

moloko avatar Jan 17 '19 17:01 moloko

no response, closing

oliverfoster avatar Apr 15 '19 10:04 oliverfoster