Uh oh!
There was an error while loading. Please reload this page.
Prevent automatic page change when using history - #75806
Conversation
rust-highfive
commented
Aug 22, 2020
Some changes occurred in HTML/CSS/JS. |
rust-highfive
commented
Aug 22, 2020
(rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Why not add this to the conditions above?
6b9e892 to
6cb364cCompareGuillaumeGomez
commented
Aug 23, 2020
Updated! |
| var search = getSearchElement(); | ||
| if (results.others.length === 1 | ||
| && getCurrentValue("rustdoc-go-to-only-result") === "true" | ||
| && (!search.firstChild || search.firstChild.innerText !== getSearchLoadingText())) |
There was a problem hiding this comment.
In what cases will !search.firstChild happen?
There was a problem hiding this comment.
By default it's empty. So it's not empty when you already performed a search and "cancelled" it (meaning, you pressed ESC or remove all the content from the search input) or if there is the "loading search result" text when you arrive on the page with a search parameter in your URL.
There was a problem hiding this comment.
Does not look that straightforward to me but I understand after you explain.
There was a problem hiding this comment.
I'll add a comment then.
GuillaumeGomez
commented
Aug 24, 2020
I added an explanation on the condition. |
pickfire
left a comment
There was a problem hiding this comment.
Good and even clearer now.
GuillaumeGomez
commented
Aug 24, 2020
@bors: r=pickfire rollup |
bors
commented
Aug 24, 2020
📌 Commit 76bd5b3 has been approved by |
bors
commented
Aug 25, 2020
⌛ Testing commit 76bd5b3 with merge 24d88da65e150c0f13e82c5cd213fcb3da348207... |
rust-log-analyzer
commented
Aug 25, 2020
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
bors
commented
Aug 25, 2020
💔 Test failed - checks-actions |
GuillaumeGomez
commented
Aug 25, 2020
clang failed? O.o Well, I guess it's out of the scope of this PR so let's retry... @bors: retry |
bors
commented
Aug 25, 2020
⌛ Testing commit 76bd5b3 with merge 1b33cf01a8507e618751d974a1cbbf831d903873... |
rust-log-analyzer
commented
Aug 25, 2020
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
GuillaumeGomez
commented
Aug 25, 2020
cc @rust-lang/infra |
bors
commented
Aug 25, 2020
💔 Test failed - checks-actions |
emilyalbini
commented
Aug 25, 2020
We're already on it. Zulip discussion. @bors retry |
GuillaumeGomez
commented
Aug 25, 2020
Oh great! Thanks for the quick answer. :) |
Rollup of 10 pull requests Successful merges: - rust-lang#74730 (Hexagon libstd: update type defs) - rust-lang#75758 (Fixes for VxWorks) - rust-lang#75780 (Unconfuse Unpin docs a bit) - rust-lang#75806 (Prevent automatic page change when using history) - rust-lang#75818 (Update docs for SystemTime Windows implementation) - rust-lang#75837 (Fix font color for help button in ayu and dark themes) - rust-lang#75870 (Unify theme choices border color in ayu theme) - rust-lang#75875 (Shorten liballoc vec resize intra-doc link) - rust-lang#75953 (Fix swapped stability attributes for rustdoc lints) - rust-lang#75958 (Avoid function-scoping global variables) Failed merges: r? @ghost
Fixes#75774.