diff options
| -rw-r--r-- | src/librustdoc/html/static/main.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 2e3e148eaf6..707eb5a664b 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -1422,11 +1422,13 @@ function hideThemeButtonState() { // errors in mobile browsers). if (e.tagName === "H2" || e.tagName === "H3") { var nextTagName = e.nextElementSibling.tagName; - if (nextTagName == "H2" || nextTagName == "H3") { + if (nextTagName === "H2" || nextTagName === "H3") { e.nextElementSibling.style.display = "flex"; - } else { + } else if (nextTagName !== "DETAILS") { e.nextElementSibling.style.display = "block"; } + } else if (e.tagName === "DETAILS") { + e.open = true; } }); } |
