Skip to content

Commit f7ad555

Browse files
committed
chore: add zindex to user dropdown
1 parent 36a475a commit f7ad555

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/react/src/components/presentation/UserDropdown/BaseUserDropdown.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,12 @@ export const BaseUserDropdown: FC<BaseUserDropdownProps> = ({
228228
<div
229229
ref={refs.setFloating}
230230
className={cx(withVendorCSSClassPrefix('user-dropdown__content'), styles.dropdownContent)}
231-
style={floatingStyles}
231+
style={{
232+
...floatingStyles,
233+
// Floating UI doesn't set a z-index by default, so we set a high value to ensure the dropdown appears above other elements.
234+
// https://floating-ui.com/docs/misc#z-index-stacking
235+
zIndex: 9999,
236+
}}
232237
{...getFloatingProps()}
233238
>
234239
<div className={cx(withVendorCSSClassPrefix('user-dropdown__header'), styles.dropdownHeader)}>

0 commit comments

Comments
 (0)