Skip to content

Commit 3ad7686

Browse files
rustdoc: Fix links in trait impl docs
1 parent 8231e85 commit 3ad7686

File tree

1 file changed

+5
-1
lines changed
  • src/librustdoc/html/static/js

1 file changed

+5
-1
lines changed

src/librustdoc/html/static/js/main.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,11 @@ function preLoadCss(cssUrl) {
10811081

10821082
onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"), el => {
10831083
el.addEventListener("click", e => {
1084-
if (e.target.tagName !== "SUMMARY" && e.target.tagName !== "A") {
1084+
if (
1085+
e.target.tagName !== "SUMMARY"
1086+
&& e.target.tagName !== "A"
1087+
&& !(e.target.tagName == "CODE" && e.target.parentNode.tagName == "A")
1088+
) {
10851089
e.preventDefault();
10861090
}
10871091
});

0 commit comments

Comments
 (0)