Only deserialize state when appropriate
[mkdru-moved-to-drupal.org.git] / mkdru.client.js
index 9fcf0ae..51835ac 100644 (file)
@@ -224,6 +224,14 @@ mkdru.uiFromState = function () {
 };
 
 mkdru.hashChange = function () {
+  // TING hack, switching tabs resets the hash but does not re-load the page
+  // simply ignore new hash and set it to the old state
+  var hash = $.param.fragment();
+  if (hash.indexOf('addon-result') == 0 || hash.indexOf('content-result') == 0
+      || hash.indexOf('ting-result') == 0) {
+    mkdru.hashFromState();
+    return;
+  }
   // do we need to restart the search?
   var searchTrigger = false;
   // shallow copy of state so we can see what changed.