diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-08-27 13:34:35 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-08-27 14:22:54 +0200 |
| commit | 86e42c2742423aacbf70ba49c499a83846f57712 (patch) | |
| tree | b919d68d52c483abf0621bf9695a76bcccf85a64 | |
| parent | 1727c7a194187af70f44f3f5b160eea8439cbc6d (diff) | |
| download | rust-86e42c2742423aacbf70ba49c499a83846f57712.tar.gz rust-86e42c2742423aacbf70ba49c499a83846f57712.zip | |
Delay help popup creation to when it's needed
| -rw-r--r-- | src/librustdoc/html/static/main.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index c2c482cd455..e31b61b2cdd 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -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 |
