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 b105556 commit 838e742Copy full SHA for 838e742
src/librustdoc/html/static/js/main.js
@@ -1179,8 +1179,10 @@ function preLoadCss(cssUrl) {
1179
1180
onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"), el => {
1181
// @ts-expect-error
1182
+ // Clicking on the summary's contents should not collapse it,
1183
+ // but links within should still fire.
1184
el.addEventListener("click", e => {
- if (e.target.tagName !== "SUMMARY" && e.target.tagName !== "A") {
1185
+ if (!e.target.matches("summary, a, a *")) {
1186
e.preventDefault();
1187
}
1188
});
0 commit comments