Skip to content

Commit 6a2aef2

Browse files
committed
FIx z-index for dropdowns
1 parent c7d6173 commit 6a2aef2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

webview-ui/src/components/settings/ApiOptions.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ interface ApiOptionsProps {
6262
}
6363

6464
// This is necessary to ensure dropdown opens downward, important for when this is used in popup
65-
const DROPDOWN_Z_INDEX = 1001 // Higher than the OpenRouterModelPicker's and ModelSelectorTooltip's z-index
65+
const DROPDOWN_Z_INDEX = OPENROUTER_MODEL_PICKER_Z_INDEX + 2 // Higher than the OpenRouterModelPicker's and ModelSelectorTooltip's z-index
6666

6767
export const DropdownContainer = styled.div<{ zIndex?: number }>`
6868
position: relative;
@@ -676,7 +676,7 @@ const ApiOptions = ({ showModelOptions, apiErrorMessage, modelIdErrorMessage, is
676676
placeholder="Enter Project ID...">
677677
<span style={{ fontWeight: 500 }}>Google Cloud Project ID</span>
678678
</VSCodeTextField>
679-
<DropdownContainer zIndex={DROPDOWN_Z_INDEX - 2} className="dropdown-container">
679+
<DropdownContainer zIndex={DROPDOWN_Z_INDEX - 1} className="dropdown-container">
680680
<label htmlFor="vertex-region-dropdown">
681681
<span style={{ fontWeight: 500 }}>Google Cloud Region</span>
682682
</label>
@@ -1374,7 +1374,7 @@ const ApiOptions = ({ showModelOptions, apiErrorMessage, modelIdErrorMessage, is
13741374

13751375
{providerSortingSelected && (
13761376
<div style={{ marginBottom: -6 }}>
1377-
<DropdownContainer className="dropdown-container" zIndex={OPENROUTER_MODEL_PICKER_Z_INDEX - 3}>
1377+
<DropdownContainer className="dropdown-container" zIndex={OPENROUTER_MODEL_PICKER_Z_INDEX + 1}>
13781378
<VSCodeDropdown
13791379
style={{ width: "100%", marginTop: 3 }}
13801380
value={apiConfiguration?.openRouterProviderSorting}

0 commit comments

Comments
 (0)