chiark / gitweb /
doxygen: go back in history when closing search.
authorVladimír Vondruš <mosra@centrum.cz>
Sun, 11 Feb 2018 17:09:29 +0000 (18:09 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Sun, 11 Feb 2018 17:09:29 +0000 (18:09 +0100)
Instead of polluting it even more. Makes back button and context
preservation behave much better now.

doxygen/search.js

index f3eeeaa9f30cbb1fbaadcb5cc40f7cc7e826719b..e33c7a39ef10990d4e4ee3e272c45a0d72d0a444 100644 (file)
@@ -489,8 +489,8 @@ function showSearch() {
 
 /* istanbul ignore next */
 function hideSearch() {
-    window.location.hash = '#!';
-    window.history.pushState('', '', window.location.pathname);
+    /* Go back to the previous state (that removes the #search hash) */
+    window.history.back();
 
     /* Restore scrollbar, prevent page layout jumps */
     document.body.style.overflow = 'auto';