mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Rollup merge of #74325 - GuillaumeGomez:focus-source-file-sidebar, r=kinnison
Focus on the current file in the source file sidebar Fixes #73360. r? @kinnison cc @rust-lang/rustdoc
This commit is contained in:
@@ -140,4 +140,9 @@ function createSourceSidebar() {
|
||||
});
|
||||
|
||||
main.insertBefore(sidebar, main.firstChild);
|
||||
// Focus on the current file in the source files sidebar.
|
||||
var selected_elem = sidebar.getElementsByClassName("selected")[0];
|
||||
if (typeof selected_elem !== "undefined") {
|
||||
selected_elem.focus();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user