We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a80559f + 52c65e0 commit 196243eCopy full SHA for 196243e
src/librustdoc/html/static/source-script.js
@@ -140,4 +140,9 @@ function createSourceSidebar() {
140
});
141
142
main.insertBefore(sidebar, main.firstChild);
143
+ // Focus on the current file in the source files sidebar.
144
+ var selected_elem = sidebar.getElementsByClassName("selected")[0];
145
+ if (typeof selected_elem !== "undefined") {
146
+ selected_elem.focus();
147
+ }
148
}
0 commit comments