diff --git a/apps/studio/src/routes/editor/WebviewArea/Frame.tsx b/apps/studio/src/routes/editor/WebviewArea/Frame.tsx index 6cade710f..2d5b04de9 100644 --- a/apps/studio/src/routes/editor/WebviewArea/Frame.tsx +++ b/apps/studio/src/routes/editor/WebviewArea/Frame.tsx @@ -45,6 +45,7 @@ const Frame = observer( const [webviewSrc, setWebviewSrc] = useState(settings.url); const [webviewPosition, setWebviewPosition] = useState(settings.position); const [isCopied, setIsCopied] = useState(false); + const [isResizing, setIsResizing] = useState(false); const runProjectCommand = getRunProjectCommand(projectManager?.folderPath || ''); const iconVariants = { @@ -240,6 +241,7 @@ const Frame = observer( setSelectedPreset={setSelectedPreset} lockedPreset={lockedPreset} setLockedPreset={setLockedPreset} + setIsResizing={setIsResizing} /> - + {domFailed && shouldShowDomFailed && (

diff --git a/apps/studio/src/routes/editor/WebviewArea/GestureScreen.tsx b/apps/studio/src/routes/editor/WebviewArea/GestureScreen.tsx index 5a3c15da1..a08ccda2a 100644 --- a/apps/studio/src/routes/editor/WebviewArea/GestureScreen.tsx +++ b/apps/studio/src/routes/editor/WebviewArea/GestureScreen.tsx @@ -9,9 +9,10 @@ import RightClickMenu from '../RightClickMenu'; interface GestureScreenProps { webviewRef: React.RefObject; setHovered: React.Dispatch>; + isResizing: boolean; } -const GestureScreen = observer(({ webviewRef, setHovered }: GestureScreenProps) => { +const GestureScreen = observer(({ webviewRef, setHovered, isResizing }: GestureScreenProps) => { const editorEngine = useEditorEngine(); function selectWebview(webview: Electron.WebviewTag) { @@ -174,7 +175,7 @@ const GestureScreen = observer(({ webviewRef, setHovered }: GestureScreenProps)

>; lockedPreset: SizePreset | null; setLockedPreset: React.Dispatch>; + setIsResizing: React.Dispatch>; } enum HandleType { @@ -30,6 +31,7 @@ const ResizeHandles = observer( setSelectedPreset, lockedPreset, setLockedPreset, + setIsResizing, }: ResizeHandleProps) => { const editorEngine = useEditorEngine(); const resizeHandleRef = useRef(null); @@ -42,6 +44,8 @@ const ResizeHandles = observer( e.preventDefault(); e.stopPropagation(); + setIsResizing(true); + const startX = e.clientX; const startY = e.clientY; const startWidth = webviewSize.width; @@ -65,6 +69,8 @@ const ResizeHandles = observer( e.preventDefault(); e.stopPropagation(); + setIsResizing(false); + window.removeEventListener('mousemove', resize); window.removeEventListener('mouseup', stopResize); }; @@ -93,7 +99,7 @@ const ResizeHandles = observer(
diff --git a/bun.lockb b/bun.lockb old mode 100755 new mode 100644