Skip to content

Commit 7418cfb

Browse files
fix(web): local server cards in the browser empty state take pointer clicks
The wrapper around the hidden server browser surface stayed visible and, being positioned, sat above the empty state and took every pointer hit. Hide the wrapper instead of the surface; the surface inherits it and its opt-in visible controls stay reachable. Fixes #34034 AI-assisted; verified with the tests and tools listed above.
1 parent e01c5ef commit 7418cfb

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎apps/web/src/components/preview/PreviewView.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,10 @@ export function PreviewView({
991991
</div>
992992
) : null}
993993
<div
994-
className="absolute inset-x-0 bottom-0"
994+
className={cn(
995+
"absolute inset-x-0 bottom-0",
996+
(showEmptyState || isUnreachable) && "invisible",
997+
)}
995998
style={{ top: viewport._tag !== "fill" ? BROWSER_DEVICE_TOOLBAR_HEIGHT : 0 }}
996999
>
9971000
<ServerBrowserSurface
@@ -1012,10 +1015,7 @@ export function PreviewView({
10121015
}
10131016
onPopup={(popupTabId) => showPreviewPopup(threadRef, popupTabId, "panel")}
10141017
// Stays connected under the empty state so a URL picked there reaches the page.
1015-
className={cn(
1016-
"absolute inset-0 h-full w-full",
1017-
(showEmptyState || isUnreachable) && "invisible",
1018-
)}
1018+
className="absolute inset-0 h-full w-full"
10191019
/>
10201020
</div>
10211021
</>

0 commit comments

Comments
 (0)