Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix: Prevent ComboboxContent from stealing focus on open (#5574)

Oleg Isonen299e6f8a5074
diff --git a/packages/design-system/src/components/combobox.tsx b/packages/design-system/src/components/combobox.tsx
index c3f1c6c6c0..277fe08b2b 100644
--- a/packages/design-system/src/components/combobox.tsx
+++ b/packages/design-system/src/components/combobox.tsx
@@ -191,13 +191,15 @@ const StyledPopoverContent = styled(PopoverContent, {
export const ComboboxContent = forwardRef(
(
- { style, onOpenAutoFocus, ...props }: ComponentProps<typeof PopoverContent>,
+ { style, ...props }: ComponentProps<typeof PopoverContent>,
forwardRef: Ref<HTMLDivElement>
) => {
return (
<Portal>
<StyledPopoverContent
- onOpenAutoFocus={onOpenAutoFocus}
+ onOpenAutoFocus={(event) => {
+ event.preventDefault();
+ }}
{...props}
ref={forwardRef}
/>