From 600a4f5e858841de04ce544528d59aeb333ce3e1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 Feb 2018 18:09:29 +0100 Subject: [PATCH] doxygen: go back in history when closing search. Instead of polluting it even more. Makes back button and context preservation behave much better now. --- doxygen/search.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doxygen/search.js b/doxygen/search.js index f3eeeaa9..e33c7a39 100644 --- a/doxygen/search.js +++ b/doxygen/search.js @@ -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'; -- 2.30.2