Skip to content

Commit 535007f

Browse files
committed
fix(mobile): browser address bar and Take control no longer hide under the header
1 parent e2a7814 commit 535007f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎apps/mobile/src/features/browser/BrowserPreviewRouteScreen.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { Platform, TextInput, View } from "react-native";
1010
import { useSafeAreaInsets } from "react-native-safe-area-context";
1111

1212
import { ControlPill } from "../../components/ui/ControlPill";
13+
import { useContentTopInset } from "../../components/ui/useBarInset";
1314
import { useAppForeground } from "../../lib/appState";
1415

1516
import { useThreadServerBrowserTabs } from "../../state/preview";
@@ -56,6 +57,7 @@ function BrowserPreviewScreen({
5657
readonly onClose: () => void;
5758
}) {
5859
const insets = useSafeAreaInsets();
60+
const contentTopInset = useContentTopInset();
5961
const { themeVariables } = useAppearancePreferences();
6062
const prepared = usePreparedConnection(environmentId);
6163
const httpBaseUrl = Option.isSome(prepared) ? prepared.value.httpBaseUrl : null;
@@ -90,7 +92,10 @@ function BrowserPreviewScreen({
9092
const live = (focused && foreground) || pictureInPicture.active;
9193

9294
return (
93-
<View className="flex-1 bg-sheet" style={{ paddingBottom: insets.bottom }}>
95+
<View
96+
className="flex-1 bg-sheet"
97+
style={{ paddingTop: contentTopInset, paddingBottom: insets.bottom }}
98+
>
9499
<SheetHeader
95100
title={tab ? browserTabTitle(tab) : "Browser"}
96101
onClose={onClose}

0 commit comments

Comments
 (0)