@@ -170,9 +170,11 @@ export function Search({
170170 id = "search-results-container"
171171 className = { cx (
172172 'z-1 pb-5 px-3' ,
173- isHeaderSearch && 'pt-9' ,
173+ isHeaderSearch &&
174+ 'pt-9 color-bg-default color-shadow-medium position-absolute top-0 right-0' ,
174175 styles . resultsContainer ,
175176 isHeaderSearch && styles . resultsContainerHeader ,
177+ query ? 'd-block' : 'd-none' ,
176178 query && styles . resultsContainerOpen
177179 ) }
178180 >
@@ -189,7 +191,13 @@ export function Search({
189191 </ div >
190192 { /* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */ }
191193 < div
192- className = { cx ( '-z-1' , isHeaderSearch && query ? styles . headerSearchOpen : 'd-none' ) }
194+ className = { cx (
195+ '-z-1' ,
196+ isHeaderSearch && query
197+ ? 'position-fixed top-0 right-0 bottom-0 left-0 d-block'
198+ : 'd-none' ,
199+ isHeaderSearch && query && styles . headerSearchOpen
200+ ) }
193201 onClick = { closeSearch }
194202 />
195203 </ >
@@ -210,7 +218,8 @@ export function Search({
210218 variant === 'expanded' && 'py-3' ,
211219 isHeaderSearch && styles . searchInputHeader ,
212220 ! isHeaderSearch && 'width-full' ,
213- isHeaderSearch && query && styles . searchInputExpanded
221+ isHeaderSearch && query && styles . searchInputExpanded ,
222+ isHeaderSearch && query && 'position-absolute top-0 right-0'
214223 ) }
215224 style = { {
216225 background : `var(--color-canvas-default) url("/assets/images/octicons/search-${ iconSize } .svg") no-repeat ${
@@ -325,7 +334,11 @@ function ShowSearchResults({
325334 const ActionListResults = (
326335 < div
327336 data-testid = "search-results"
328- className = { cx ( 'mt-3' , isHeaderSearch && styles . headerSearchResults ) }
337+ className = { cx (
338+ 'mt-3' ,
339+ isHeaderSearch && styles . headerSearchResults ,
340+ isHeaderSearch && 'overflow-auto'
341+ ) }
329342 >
330343 < div className = "my-4" >
331344 < p className = "mx-4" >
@@ -372,7 +385,7 @@ function ShowSearchResults({
372385 </ small >
373386 ) }
374387 < div
375- className = { cx ( styles . searchResultTitle , 'mt-2 d-block f4 text-semibold' ) }
388+ className = { cx ( 'mt-2 d-block f4 text-semibold' ) }
376389 dangerouslySetInnerHTML = { {
377390 __html : title ,
378391 } }
0 commit comments