From f41f72a4f3718bade651cb48cec4fd8ead20a962 Mon Sep 17 00:00:00 2001 From: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com> Date: Sun, 1 Nov 2026 22:49:46 +0000 Subject: [PATCH] fix(mobile): keep the image viewer's close button out of the iPhone Duo status column (#37203) The close button sat at a fixed 16pt from the right edge and ignored the window's right safe-area inset, which on the iPhone Duo is the status column holding the clock and the camera. Offset it by that inset, and size it to 44pt itself because page Pressables ignore hitSlop. --- .../native-chat/visual/MobileNativeChatImageViewer.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mobile/src/session/native-chat/visual/MobileNativeChatImageViewer.tsx b/mobile/src/session/native-chat/visual/MobileNativeChatImageViewer.tsx index 4be6d3a6ae7..f8c01c38965 100644 --- a/mobile/src/session/native-chat/visual/MobileNativeChatImageViewer.tsx +++ b/mobile/src/session/native-chat/visual/MobileNativeChatImageViewer.tsx @@ -44,11 +44,10 @@ export function MobileNativeChatImageViewer({ [ styles.close, - { top: insets.top + spacing.sm }, + { top: insets.top + spacing.sm, right: insets.right + spacing.lg }, pressed && { opacity: feedback.pressedOpacity } ]} onPress={close} - hitSlop={12} accessibilityRole="button" accessibilityLabel={t('chat.nativeChatImageViewer.closeImage', 'Close image')} > @@ -106,10 +105,13 @@ const styles = themedStyleSheet(() => ({ stage: { flex: 1 }, + // Page Pressables ignore hitSlop, so the button itself is the 44pt target. close: { position: 'absolute', - right: spacing.lg, - padding: spacing.sm, + width: 44, + height: 44, + alignItems: 'center', + justifyContent: 'center', borderRadius: radii.pill, backgroundColor: colors.bgRaised }