Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 2ecd2d1

Browse files
authored
svelte: Show code intel popovers above global navigation (#62125)
On the file page it's possible that a popover is extending outside the file view and "reaching" into the global header. Because the global header has z-index: 1 it's currently rendered above all other, partially covering the popover. This commit solves this issue by removing the z-index from the global header and instead moves it where it's needed, namely rendering search input suggestions above search results.
1 parent 8e140ee commit 2ecd2d1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

client/web-sveltekit/src/lib/navigation/GlobalHeader.svelte

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@
111111
border-bottom: 1px solid var(--border-color-2);
112112
background-color: var(--color-bg-1);
113113
114-
// This ensures that all arbitrary content is rendered above
115-
// other elements on the page.
116-
z-index: 1;
117114
position: relative;
118115
height: 50px;
119116
min-width: 0;

client/web-sveltekit/src/routes/search/SearchResults.svelte

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@
127127
</svelte:head>
128128

129129
<GlobalHeaderPortal>
130-
<SearchInput {queryState} size="compat" />
130+
<div class="search-header">
131+
<SearchInput {queryState} size="compat" />
132+
</div>
131133
</GlobalHeaderPortal>
132134

133135
<div class="search-results">
@@ -179,6 +181,13 @@
179181
</div>
180182

181183
<style lang="scss">
184+
.search-header {
185+
width: 100%;
186+
// This ensures that the search suggestions panel is displayed above the
187+
// search results panel.
188+
z-index: 1;
189+
}
190+
182191
.search-results {
183192
display: flex;
184193
flex: 1;

0 commit comments

Comments
 (0)