Skip to content

Commit e161461

Browse files
committed
Remove outdated workaround for rustdoc scrolling
It used to be that the <DIV CLASS="rustdoc"> had `overflow: auto` on it, so when a menu was closed, we needed to focus it to make sure keyboard scrolling worked. It doesn't work that way any more, so the workaround is dead code.
1 parent f06b0ca commit e161461

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

static/menu.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,7 @@
2929
}
3030
function closeMenu() {
3131
if (this === backdrop) {
32-
var rustdoc = document.querySelector(".rustdoc");
33-
if (rustdoc) {
34-
rustdoc.focus();
35-
} else {
36-
document.documentElement.focus();
37-
}
32+
document.documentElement.focus();
3833
} else if (currentMenu.querySelector(".pure-menu-link:focus")) {
3934
currentMenu.firstElementChild.focus();
4035
}

0 commit comments

Comments
 (0)