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 fe4b9ef commit 96d3414Copy full SHA for 96d3414
src/librustdoc/html/static/js/main.js
@@ -1080,12 +1080,10 @@ function preLoadCss(cssUrl) {
1080
});
1081
1082
onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"), el => {
1083
+ // Clicking on the summary's contents should not collapse it,
1084
+ // but links within should still fire.
1085
el.addEventListener("click", e => {
- if (
- e.target.tagName !== "SUMMARY"
1086
- && e.target.tagName !== "A"
1087
- && !(e.target.tagName === "CODE" && e.target.parentNode.tagName === "A")
1088
- ) {
+ if (!e.target.matches("summary, a, a *")) {
1089
e.preventDefault();
1090
}
1091
0 commit comments