fix: Resize drag handle in FF and Safari (#4726)

## Description

ref #1818

There are no resize="auto" 
https://developer.mozilla.org/en-US/docs/Web/CSS/resize

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
0000)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
This commit is contained in:
Ivan Starkov authored and GitHub committed 2025-01-06 22:33:11 +03:00
1 parent 14494a9c77
commit 91e6b23bdf
5 files changed
+8 -8

No files matched your search

@@ -25,7 +25,7 @@ export const RemoteDialog = () => {
}}
modal={false}
draggable
resize="auto"
resize="both"
>
<DialogContent width={640} height={640}>
<iframe
@@ -462,7 +462,7 @@ export const EditorDialog = ({
height={height}
placement={placement}
maximizable
resize="auto"
resize="both"
content={
<Grid
align="stretch"
@@ -550,7 +550,7 @@ export const ValuePreviewDialog = ({
onOpenChange={onOpenChange}
title={title}
content={<ValuePreviewEditor value={value} />}
resize="auto"
resize="both"
>
{children}
</EditorDialog>
@@ -52,7 +52,7 @@ const panelStyle = css({
const DialogContext = createContext<{
isMaximized: boolean;
setIsMaximized: (isMaximized: boolean) => void;
resize?: "auto" | "none";
resize?: "both" | "none";
draggable?: boolean;
}>({
isMaximized: false,
@@ -66,7 +66,7 @@ export const Dialog = ({
draggable,
...props
}: ComponentProps<typeof Primitive.Dialog> & {
resize?: "auto" | "none";
resize?: "both" | "none";
draggable?: boolean;
}) => {
const [isMaximized, setIsMaximized] = useState(false);
@@ -396,8 +396,8 @@ const contentStyle = css(panelStyle, {
overflow: "hidden",
variants: {
resize: {
auto: {
resize: "auto",
both: {
resize: "both",
},
none: {
resize: "none",
@@ -74,7 +74,7 @@ export const Center = () => {
placement="center"
open
maximizable
resize="auto"
resize="both"
title="Title"
content={<Text>Content</Text>}
>