Skip to content

Commit 8952d20

Browse files
PR Batch Testerclaude
andcommitted
fix(mobile): new-thread composer keeps its inset above a zero-height keyboard
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 77d125c commit 8952d20

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎apps/mobile/src/features/threads/NewTaskDraftScreen.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,12 @@ export function NewTaskDraftScreen(props: {
219219
// iPhone sheet and an iPad column that also carries the status bar.
220220
const navigationHeaderHeight = useContext(HeaderHeightContext) ?? insets.top + 56;
221221
const isKeyboardVisible = useKeyboardState((state) => state.isVisible);
222+
const keyboardHasHeight = useKeyboardState((state) => state.height > 0);
222223
const controlsBottomPadding = Math.max(insets.bottom, 10);
223-
const keyboardOpenedOffset = Math.max(0, controlsBottomPadding - 8);
224+
// A hardware keyboard can leave the IME visible with no height: nothing lifts the
225+
// composer then, so cancelling the padding would drop it under the taskbar.
226+
const keyboardOpenedOffset =
227+
isKeyboardVisible && !keyboardHasHeight ? 0 : Math.max(0, controlsBottomPadding - 8);
224228
const { projectScopes, selectedProject, selectedProjectKey, setProject } = flow;
225229
const selectedProjectLabel = (() => {
226230
if (!selectedProject) return null;

0 commit comments

Comments
 (0)