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.
1 parent 4a689da commit 382d5bbCopy full SHA for 382d5bb
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_elems = Array.prototype.slice.call(sidebar.getElementsByClassName("selected"));
145
+ if (selected_elems.length > 0) {
146
+ selected_elems[0].focus();
147
+ }
148
}
0 commit comments