From f52a6ab3472579443a8256ec9a5015d3e4c1391c Mon Sep 17 00:00:00 2001 From: Brian Rourke Boll Date: Sat, 25 May 2024 11:23:31 -0400 Subject: [PATCH] Expand details before scrolling --- docs/content/fsdocs-theme.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/fsdocs-theme.js b/docs/content/fsdocs-theme.js index 220a6472..88576ec5 100644 --- a/docs/content/fsdocs-theme.js +++ b/docs/content/fsdocs-theme.js @@ -14,10 +14,10 @@ if (activeItem && mainMenu) { function scrollToAndExpandSelectedMember() { if (location.hash) { - const header = document.querySelector(`a[href='${location.hash}']`); - header.scrollIntoView({ behavior: 'instant'}); const details = document.querySelector(`tr > td.fsdocs-member-usage:has(a[href='${location.hash}']) ~ td.fsdocs-member-xmldoc > details`); details?.setAttribute('open', 'true'); + const header = document.querySelector(`a[href='${location.hash}']`); + header.scrollIntoView({ behavior: 'instant'}); } }