From 577bf26d1e15910f8844d35827fdbc7f7694dd51 Mon Sep 17 00:00:00 2001 From: Peter White <1788320+peterwhite@users.noreply.github.com> Date: Tue, 24 Feb 2026 09:53:36 +0100 Subject: [PATCH] Fix anchor ID collisions by removing non-content UX IDs (#4035) --- .../gitbook/src/components/AIChat/AIChatButton.tsx | 2 +- .../components/Announcement/AnnouncementBanner.tsx | 2 +- packages/gitbook/src/components/Footer/Footer.tsx | 2 +- packages/gitbook/src/components/Header/Header.tsx | 4 ++-- .../gitbook/src/components/PageBody/PageCover.tsx | 2 +- .../gitbook/src/components/RootLayout/globals.css | 2 +- .../src/components/SiteSections/SiteSectionTabs.tsx | 2 +- .../components/TableOfContents/TableOfContents.tsx | 2 +- .../TableOfContents/TableOfContentsScript.tsx | 8 ++++---- .../gitbook/src/components/primitives/SideSheet.tsx | 2 +- packages/gitbook/tailwind.config.ts | 11 +++++++---- 11 files changed, 21 insertions(+), 18 deletions(-) diff --git a/packages/gitbook/src/components/AIChat/AIChatButton.tsx b/packages/gitbook/src/components/AIChat/AIChatButton.tsx index 4c7ef06a6..77d471601 100644 --- a/packages/gitbook/src/components/AIChat/AIChatButton.tsx +++ b/packages/gitbook/src/components/AIChat/AIChatButton.tsx @@ -18,7 +18,7 @@ export function AIChatButton(props: { }) { const { assistant, showLabel = true, withShortcut = true } = props; const language = useLanguage(); - const isMobile = useIsMobile(MOBILE_BREAKPOINT, '#header-content'); + const isMobile = useIsMobile(MOBILE_BREAKPOINT, '[data-gb-header-content]'); return (