From a102e5abb839257d35bd220efdc75348d1b67a94 Mon Sep 17 00:00:00 2001 From: khushalsonawat Date: Tue, 18 Aug 2026 15:42:34 +0530 Subject: [PATCH 01/18] fix(nav): sync header tab highlight on FastNav content swaps FastNav swaps article, TOC, title, and sidebar on intercepted link clicks, but never the header tabs, so cross-tab jumps through the sidebar dropdown's Reference section (Docs to Cookbooks to SDK) kept the previous tab highlighted. Swap the header tablist from the fetched document alongside the other regions. Signed-off-by: khushalsonawat --- src/components/FastNav.astro | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/FastNav.astro b/src/components/FastNav.astro index 40b2d6134..59383ca44 100644 --- a/src/components/FastNav.astro +++ b/src/components/FastNav.astro @@ -129,6 +129,15 @@ oldSidebar.innerHTML = newSidebar.innerHTML; } + // Sync header tab highlight — intercepted links can cross tabs (e.g. the + // sidebar dropdown's Reference section links Docs/Cookbooks/SDK to each + // other), and nothing else swaps the header's active state + var newTabs = doc.querySelector('header nav[role="tablist"]'); + var oldTabs = document.querySelector('header nav[role="tablist"]'); + if (newTabs && oldTabs) { + oldTabs.innerHTML = newTabs.innerHTML; + } + // Re-execute inline scripts in swapped article // (innerHTML doesn't execute