Skip to content

Commit 80e96b6

Browse files
shivamhwpclaude
andcommitted
fix(mobile): re-place the Android picker when its screen regains focus
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 9e603f9 commit 80e96b6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/mobile/src/features/threads/ComposerPopoverAnchor.android.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ export function ComposerPopoverAnchor(props: { readonly children: ReactNode }) {
4141
});
4242
}, []);
4343

44+
// The overlay remounts when the screen regains focus, and the composer may
45+
// have moved while it was away, so measure both.
4446
const measureOverlay = useCallback(() => {
47+
measureAnchor();
4548
overlayRef.current?.measureInWindow((x, y, width, height) => {
4649
const next = { x, y, width, height };
4750
setOverlay((current) => (sameFrame(current, next) ? current : next));
4851
});
49-
}, []);
52+
}, [measureAnchor]);
5053

5154
// The composer moves without resizing when the keyboard opens or closes.
5255
// Measure once the keyboard has settled, not while it animates.

0 commit comments

Comments
 (0)