Skip to content

Commit a698882

Browse files
committed
I was meant to merge this before the auto-syncing stops but was late a little bit. It's a frontend change for RDoc so ideally we'd want to test it on docs.ruby-lang.org for a few days before the 3.4 release.
1 parent 98bf912 commit a698882

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/rdoc/generator/template/darkfish/js/darkfish.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ function hookSidebar() {
103103
if (isSmallViewport) {
104104
navigation.hidden = true;
105105
navigationToggle.ariaExpanded = false;
106+
document.addEventListener('click', (e) => {
107+
if (e.target.closest('#navigation a')) {
108+
navigation.hidden = true;
109+
navigationToggle.ariaExpanded = false;
110+
}
111+
});
106112
}
107113
}
108114

0 commit comments

Comments
 (0)