diff client/digitallibrary/jquery/jquery.digilib.js @ 890:613c2089bc7a jquery

use setstate in redisplay instead of pushstate as long as we don't deal with popstate (i.e. history-back).
author robcast
date Thu, 07 Apr 2011 10:22:26 +0200
parents 65ad22044e13
children 01b875d668b1
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.js	Wed Apr 06 13:26:40 2011 +0200
+++ b/client/digitallibrary/jquery/jquery.digilib.js	Thu Apr 07 10:22:26 2011 +0200
@@ -931,9 +931,8 @@
             if (typeof history.pushState === 'function') {
                 console.debug("faking reload to "+url);
                 // change url without reloading (stateObj, title, url)
-                // TODO: we really need to put the state in stateObj and listen to pop-events
-                // TODO: use replace-state(?)
-                history.pushState({}, '', url);
+                // TODO: we really need to push the state in stateObj and listen to pop-events
+                history.replaceState({}, '', url);
                 // change img src
                 var imgurl = getScalerUrl(data);
                 data.$img.attr('src', imgurl);