From d6861f9171e56d40e2872f31f5d7e7af82017261 Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 2 Mar 2013 10:55:13 +0000 Subject: [PATCH] fix event handlers in URL controller --- static/js/pandora/URL.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/js/pandora/URL.js b/static/js/pandora/URL.js index fec5bff24..7bc4bda97 100644 --- a/static/js/pandora/URL.js +++ b/static/js/pandora/URL.js @@ -302,12 +302,12 @@ pandora.URL = (function() { views: views }); - window.onhashchange = function() { + window.addEventListener('hashchange', function() { Ox.Request.cancel(); that.parse(); - }; + }); - window.onpopstate = function(e) { + window.addEventListener('popstate', function(e) { Ox.Request.cancel(); self.isPopState = true; $('.OxDialog:visible').each(function() { @@ -337,7 +337,7 @@ pandora.URL = (function() { } else { that.parse(); } - }; + }); return that;