From: Lucas Di Pentima Date: Tue, 1 Nov 2022 22:24:14 +0000 (-0300) Subject: 19687: Fixes log panel scrolling behavior in Safari. X-Git-Tag: 2.5.0~25^2 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/034bf8ad6df6c47d3c392ae8233c8d08dc6b4609 19687: Fixes log panel scrolling behavior in Safari. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- diff --git a/src/components/multi-panel-view/multi-panel-view.tsx b/src/components/multi-panel-view/multi-panel-view.tsx index f0cbcf56..877061de 100644 --- a/src/components/multi-panel-view/multi-panel-view.tsx +++ b/src/components/multi-panel-view/multi-panel-view.tsx @@ -67,6 +67,7 @@ interface MPVPanelDataProps { panelRef?: MutableRefObject; forwardProps?: boolean; maxHeight?: string; + minHeight?: string; } interface MPVPanelActionProps { @@ -82,7 +83,7 @@ type MPVPanelContentProps = {children: ReactElement} & MPVPanelProps & GridProps // Grid item compatible component for layout and MPV props passing export const MPVPanelContent = ({doHidePanel, doMaximizePanel, doUnMaximizePanel, panelName, - panelMaximized, panelIlluminated, panelRef, forwardProps, maxHeight, + panelMaximized, panelIlluminated, panelRef, forwardProps, maxHeight, minHeight, ...props}: MPVPanelContentProps) => { useEffect(() => { if (panelRef && panelRef.current) { @@ -90,11 +91,11 @@ export const MPVPanelContent = ({doHidePanel, doMaximizePanel, doUnMaximizePanel } }, [panelRef]); - const mh = panelMaximized + const maxH = panelMaximized ? '100%' : maxHeight; - return + return {/* Element to scroll to when the panel is selected */} { forwardProps diff --git a/src/views/process-panel/process-log-card.tsx b/src/views/process-panel/process-log-card.tsx index 03739699..4890c726 100644 --- a/src/views/process-panel/process-log-card.tsx +++ b/src/views/process-panel/process-log-card.tsx @@ -55,6 +55,7 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ }, logViewer: { height: '100%', + overflowY: 'scroll', // Required for MacOS's Safari -- See #19687 }, logViewerContainer: { height: '100%', diff --git a/src/views/process-panel/process-panel-root.tsx b/src/views/process-panel/process-panel-root.tsx index bc485d9f..ed808b36 100644 --- a/src/views/process-panel/process-panel-root.tsx +++ b/src/views/process-panel/process-panel-root.tsx @@ -121,7 +121,7 @@ export const ProcessPanelRoot = withStyles(styles)( onCopy={props.onCopyToClipboard} process={process} /> - +