Skip to content
6 changes: 5 additions & 1 deletion apps/mobile/src/features/threads/ThreadFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ import {
useWindowDimensions,
View,
} from "react-native";
import { KeyboardController } from "react-native-keyboard-controller";
import { Image as ExpoImage } from "expo-image";
import { useResolveClassNames } from "uniwind";
import { useFilePreviewGallery, FilePreviewGallery } from "../../components/FilePreviewGallery";
Expand Down Expand Up @@ -2761,6 +2762,9 @@ export const ThreadFeed = memo(function ThreadFeed({
}
};
const handleScrollBeginDrag = () => {
if (Platform.OS === "android") {
void KeyboardController.dismiss();
}
clearUserScrollSettle();
userScrollSessionRef.current = true;
cancelReflow();
Expand Down Expand Up @@ -3302,7 +3306,7 @@ export const ThreadFeed = memo(function ThreadFeed({
onItemSizeChanged={handleItemSizeChanged}
drawDistance={500}
keyboardShouldPersistTaps="always"
keyboardDismissMode="none"
keyboardDismissMode={Platform.OS === "ios" ? "interactive" : "on-drag"}
keyboardLiftBehavior="whenAtEnd"
// Seed viewport size to skip programmatic attach-time positioning, which races UIKit's adjustedContentInset.
{...(viewportHeight > 0 && viewportWidth > 0
Expand Down
3 changes: 3 additions & 0 deletions apps/mobile/src/lib/filePreview.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ vi.mock("react-native", () => ({
props.children,
),
}));
vi.mock("react-native-keyboard-controller", () => ({
KeyboardController: { dismiss: vi.fn(async () => {}) },
}));
vi.mock("../components/PierreEntryIcon", () => ({ PierreEntryIcon: () => null }));
vi.mock("../components/ui/AppText", () => ({
AppText: ({ children }: { children?: ReactNode }) => createElement("span", null, children),
Expand Down
Loading