From 3a80fc0f74b8568da6e52c5247b39625b9447cce Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 Feb 2018 22:43:36 +0100 Subject: [PATCH] doxygen: the search might lead to the same page, so restore the scrollbar. --- doxygen/search.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doxygen/search.js b/doxygen/search.js index 7575c271..25b09555 100644 --- a/doxygen/search.js +++ b/doxygen/search.js @@ -552,7 +552,11 @@ if(typeof document !== 'undefined') { /* Go to result */ } else if(event.key == 'Enter') { document.getElementById('search-current').firstElementChild.click(); - return false; /* so the keypress doesn't affect input cursor */ + + /* We might be staying on the same page, so restore scrollbar, + and prevent page layout jumps */ + document.body.style.overflow = 'auto'; + document.body.style.paddingRight = '0'; } /* Search hidden */ -- 2.30.2