mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
Delay help popup creation to when it's needed
This commit is contained in:
parent
1727c7a194
commit
86e42c2742
@ -344,6 +344,7 @@ function defocusSearchBar() {
|
||||
}
|
||||
|
||||
function getHelpElement() {
|
||||
buildHelperPopup();
|
||||
return document.getElementById("help");
|
||||
}
|
||||
|
||||
@ -2818,12 +2819,12 @@ function defocusSearchBar() {
|
||||
|
||||
popup.appendChild(container);
|
||||
insertAfter(popup, getSearchElement());
|
||||
// So that it's only built once and then it'll do nothing when called!
|
||||
buildHelperPopup = function() {};
|
||||
}
|
||||
|
||||
onHashChange(null);
|
||||
window.onhashchange = onHashChange;
|
||||
|
||||
buildHelperPopup();
|
||||
}());
|
||||
|
||||
// This is required in firefox. Explanations: when going back in the history, firefox doesn't re-run
|
||||
|
Loading…
Reference in New Issue
Block a user