Fix clicking on anchors inside summary tags.

This commit is contained in:
Jacob Hoffman-Andrews 2021-11-24 10:43:58 -08:00
parent c6a7ca196a
commit 04cb0dc8a9
2 changed files with 5 additions and 1 deletions

View file

@ -888,7 +888,7 @@ function hideThemeButtonState() {
onEachLazy(document.querySelectorAll(".rustdoc-toggle > summary:not(.hideme)"), function(el) {
el.addEventListener("click", function(e) {
if (e.target.tagName != "SUMMARY") {
if (e.target.tagName != "SUMMARY" && e.target.tagName != "A") {
e.preventDefault();
}
});