diff --git a/frontend/src/app/pages/Dashboard/cards/BrowserCard.tsx b/frontend/src/app/pages/Dashboard/cards/BrowserCard.tsx index 8bde7d02..18cba498 100644 --- a/frontend/src/app/pages/Dashboard/cards/BrowserCard.tsx +++ b/frontend/src/app/pages/Dashboard/cards/BrowserCard.tsx @@ -1612,6 +1612,23 @@ const BrowserCard: React.FC = ({ {findOpen && !suspendedSnap && ( setFindOpen(false)} /> )} + {/* Docked in chat = inert preview (ENG-348): body clicks can't reach the page, drag works from anywhere, wheel scrolls the transcript. Header (z16) keeps its controls. */} + {dockActive && ( + { + e.stopPropagation(); + let el = document.querySelector(`[data-browser-slot="${dockedTo}"]`) as HTMLElement | null; + while (el && el.scrollHeight <= el.clientHeight + 1) el = el.parentElement; + if (el) el.scrollTop += e.deltaY; + }} + sx={{ position: 'absolute', inset: 0, zIndex: 15, cursor: 'grab', '&:active': { cursor: 'grabbing' } }} + /> + )} {isElementSelectMode && ( )} diff --git a/frontend/src/app/pages/Dashboard/cards/DashboardViewCard.tsx b/frontend/src/app/pages/Dashboard/cards/DashboardViewCard.tsx index f172695c..4d3193c2 100644 --- a/frontend/src/app/pages/Dashboard/cards/DashboardViewCard.tsx +++ b/frontend/src/app/pages/Dashboard/cards/DashboardViewCard.tsx @@ -875,6 +875,23 @@ const DashboardViewCard: React.FC = ({ {cmdHeld && !isSelected && ( )} + {/* Docked in chat = inert preview (ENG-348): body clicks can't reach the app, drag works from anywhere, wheel scrolls the transcript. */} + {dockActive && ( + { + e.stopPropagation(); + let el = document.querySelector(`[data-browser-slot="${dockedTo}"]`) as HTMLElement | null; + while (el && el.scrollHeight <= el.clientHeight + 1) el = el.parentElement; + if (el) el.scrollTop += e.deltaY; + }} + sx={{ position: 'absolute', inset: 0, zIndex: 14, cursor: 'grab', '&:active': { cursor: 'grabbing' } }} + /> + )}