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.

always have content semantically on-top for proper focus state

Sultan6604ee349a2d
diff --git a/apps/designer/app/designer/features/style-panel/shared/value-picker-popover.tsx b/apps/designer/app/designer/features/style-panel/shared/value-picker-popover.tsx
index 0195cfadd7..816b4d4bfe 100644
--- a/apps/designer/app/designer/features/style-panel/shared/value-picker-popover.tsx
+++ b/apps/designer/app/designer/features/style-panel/shared/value-picker-popover.tsx
@@ -56,8 +56,8 @@ export const ValuePickerPopover = ({
align="start"
css={{ width: PANEL_WIDTH }}
>
- <PopoverHeader title={title} />
{content}
+ <PopoverHeader title={title} />
</PopoverContent>
</PopoverPortal>
</Popover>
diff --git a/packages/design-system/src/components/popover.tsx b/packages/design-system/src/components/popover.tsx
index dda4c1c1d6..def00764ee 100644
--- a/packages/design-system/src/components/popover.tsx
+++ b/packages/design-system/src/components/popover.tsx
@@ -25,6 +25,8 @@ const StyledContent = styled(PopoverPrimitive.Content, panelStyles, {
"&:focus": {
outline: "none",
},
+ display: "flex",
+ flexDirection: "column",
});
type PopoverContentPrimitiveProps = React.ComponentProps<
@@ -67,7 +69,7 @@ type PopoverHeaderProps = {
export const PopoverHeader = ({ title }: PopoverHeaderProps) => {
return (
- <>
+ <Box css={{ order: -1 }}>
<Flex
css={{ height: 40, paddingLeft: "$spacing$9" }}
align="center"
@@ -87,7 +89,7 @@ export const PopoverHeader = ({ title }: PopoverHeaderProps) => {
</PopoverClose>
</Flex>
<Separator />
- </>
+ </Box>
);
};