1
Fork 0

Fix going back in history to a search result page on firefox

This commit is contained in:
Guillaume Gomez 2020-05-16 17:51:16 +02:00
parent 97f3eeec82
commit ed8478036c

View file

@ -2703,3 +2703,9 @@ function focusSearchBar() {
function defocusSearchBar() {
getSearchInput().blur();
}
// This is required in firefox. Explanations: when going back in the history, firefox doesn't re-run
// the JS, therefore preventing rustdoc from setting a few things required to be able to reload the
// previous search results (if you navigated to a search result with the keyboard, pressed enter on
// it to navigate to that result, and then came back to this page).
window.onunload = function(){};