I am running into issues was externalChange not firing in IE when you leave the page and click back or when you refresh the page.
One of the web pages that is having issues is http://www.travelwisconsin.com/events. This is happening in IE9 for sure but I was also able to reproduce it in IE10 using BrowserStack
Steps to reproduce:
- Go to http://www.travelwisconsin.com/events
- Go to directory at bottom of page
- Page through directory a few times (The Url will update with a hashed url).
- Click View details on one of the events
- Click browser back button
- Page will not call externalChange to trigger the ajax call for the page you were last on
Below is the javascript I used to setup this process. The externalChange method is never called when you get to step 6 above. Do you have any suggestions of what may be occurring?
var isInit = true;
$.address.strict(false);
$.address.externalChange(function(e)
{
var pageNumber = e.value == ""||e.value=="/"?1:e.value.split('/')[e.value.split('/').length - 1].split('?')[0];
var isArticleTab = !(e.value == ""||e.value=="/"||e.value.indexOf("Directory") >= 0);
if ((!isInit||e.value !="")&&e.value != "directoryAnchor")
{
if (e.value == ""||e.value=="/")
{
wdot.ContentPages.DirectoryListing.LoadEventsPage($(".directoryListContainer"), false, 1, true);
} else {
if (pageNumber != 1) {
wdot.ContentPages.DirectoryListing.LoadEventsPage(!isArticleTab ? $(".directoryListContainer") : $(".articleDirectoryListing"),false, pageNumber,null,$.address.queryString());
} else {
wdot.ContentPages.DirectoryListing.LoadEventsPage($(".directoryListContainer"),false, 1,null,$.address.queryString());
}
}
isInit = false;
} else {
isInit = false;
}
});