From 2b8a2d24b68442502c75ca1986970806776eed1d Mon Sep 17 00:00:00 2001 From: Zeno Kapitein Date: Wed, 17 Sep 2025 17:27:47 +0200 Subject: [PATCH] Add stable scroll gutter to search container (#3656) --- .changeset/cool-falcons-report.md | 5 +++++ packages/gitbook/src/components/Search/SearchContainer.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/cool-falcons-report.md diff --git a/.changeset/cool-falcons-report.md b/.changeset/cool-falcons-report.md new file mode 100644 index 000000000..7e3d8741e --- /dev/null +++ b/.changeset/cool-falcons-report.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Add stable scroll gutter to search container diff --git a/packages/gitbook/src/components/Search/SearchContainer.tsx b/packages/gitbook/src/components/Search/SearchContainer.tsx index a004d741d..5da612188 100644 --- a/packages/gitbook/src/components/Search/SearchContainer.tsx +++ b/packages/gitbook/src/components/Search/SearchContainer.tsx @@ -230,7 +230,7 @@ export function SearchContainer(props: SearchContainerProps) { onOpenAutoFocus: (event) => event.preventDefault(), align: 'start', className: - '@container bg-tint-base has-[.empty]:hidden scroll-py-2 w-128 p-2 max-h-[min(32rem,var(--radix-popover-content-available-height))] max-w-[min(var(--radix-popover-content-available-width),32rem)]', + '@container overflow-y-scroll bg-tint-base has-[.empty]:hidden scroll-py-2 w-128 p-2 max-h-[min(32rem,var(--radix-popover-content-available-height))] max-w-[min(var(--radix-popover-content-available-width),32rem)]', onInteractOutside: (event) => { // Don't close if clicking on the search input itself if (searchInputRef.current?.contains(event.target as Node)) {