diff --git a/static/js/pandora/URL.js b/static/js/pandora/URL.js index 3e40923e..e28cb817 100644 --- a/static/js/pandora/URL.js +++ b/static/js/pandora/URL.js @@ -100,11 +100,6 @@ pandora.URL = (function() { Ox.print('SET STATE:', state) var find, previousUI = pandora.UI.getPrevious(); - Ox.Request.cancel(); - $('video').each(function() { - $(this).trigger('stop'); - }); - pandora.user.ui._groupsState = pandora.getGroupsState(pandora.user.ui.find); pandora.user.ui._findState = pandora.getFindState(pandora.user.ui.find); @@ -207,6 +202,11 @@ pandora.URL = (function() { } //*/ + Ox.Request.cancel(); + $('video').each(function() { + $(this).trigger('stop'); + }); + if (!pandora.$ui.appPanel && state.item && pandora.user.ui.find) { // on page load, if item is set and there is or was a query, // we have to check if the item actually matches the query, diff --git a/static/js/pandora/ui/siteDialog.js b/static/js/pandora/ui/siteDialog.js index c14547ec..729fb3dc 100644 --- a/static/js/pandora/ui/siteDialog.js +++ b/static/js/pandora/ui/siteDialog.js @@ -62,9 +62,7 @@ pandora.ui.siteDialog = function(section) { }).bindEvent({ click: function() { $dialog.close(); - //fixme: this should be using URL.push / UI.set - //but that currenlty causes a reload - history.pushState({}, '', '/'); + pandora.URL.update(); } }) ],