diff --git a/services/web/frontend/js/features/ide-react/components/editor-and-pdf.tsx b/services/web/frontend/js/features/ide-react/components/editor-and-pdf.tsx index 34f0492861..eb3552105d 100644 --- a/services/web/frontend/js/features/ide-react/components/editor-and-pdf.tsx +++ b/services/web/frontend/js/features/ide-react/components/editor-and-pdf.tsx @@ -89,20 +89,18 @@ export default function EditorAndPdf({ ) : null} - {pdfIsOpen || resizing ? ( - setPdfIsOpen(!collapsed)} - className="ide-react-panel" - > - - - ) : null} + setPdfIsOpen(!collapsed)} + className="ide-react-panel" + > + {pdfIsOpen || resizing ? : null} + ) } diff --git a/services/web/frontend/js/features/ide-react/components/resize/horizontal-resize-handle.tsx b/services/web/frontend/js/features/ide-react/components/resize/horizontal-resize-handle.tsx index 5834e444b7..ef68b216e9 100644 --- a/services/web/frontend/js/features/ide-react/components/resize/horizontal-resize-handle.tsx +++ b/services/web/frontend/js/features/ide-react/components/resize/horizontal-resize-handle.tsx @@ -15,6 +15,12 @@ export const HorizontalResizeHandle: FC< const { t } = useTranslation() const [isDragging, setIsDragging] = useState(false) + function handleDragging(isDraggingParam: boolean) { + if (isDragging || resizable) { + setIsDragging(isDraggingParam) + } + } + // Only call onDragging prop when the pointer moves after starting a drag useEffect(() => { if (isDragging) { @@ -35,7 +41,7 @@ export const HorizontalResizeHandle: FC<