From 2b917c7eca55fa848f2c401db0524a0189d1fda9 Mon Sep 17 00:00:00 2001 From: Ammar Ahmed <40239442+ammarahm-ed@users.noreply.github.com> Date: Tue, 24 Oct 2023 15:57:20 +0500 Subject: [PATCH] mobile: fix pin input hide behind keyboard on session expiry sheet (#3624) --- apps/mobile/app/components/auth/session-expired.js | 4 +++- apps/mobile/app/components/dialog/base-dialog.js | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/mobile/app/components/auth/session-expired.js b/apps/mobile/app/components/auth/session-expired.js index 19de19bea..6966f8933 100644 --- a/apps/mobile/app/components/auth/session-expired.js +++ b/apps/mobile/app/components/auth/session-expired.js @@ -142,9 +142,9 @@ export const SessionExpired = () => { passwordInputRef.current?.focus(); setFocused(true); }} + enableSheetKeyboardHandler={true} visible={true} > - { + + ) ); diff --git a/apps/mobile/app/components/dialog/base-dialog.js b/apps/mobile/app/components/dialog/base-dialog.js index 4f8a99274..0b0f2ff2f 100644 --- a/apps/mobile/app/components/dialog/base-dialog.js +++ b/apps/mobile/app/components/dialog/base-dialog.js @@ -51,7 +51,8 @@ const BaseDialog = ({ bounce = true, closeOnTouch = true, useSafeArea = true, - avoidKeyboardResize = false + avoidKeyboardResize = false, + enableSheetKeyboardHandler = false }) => { const floating = useIsFloatingKeyboard(); const appState = useAppState(); @@ -103,7 +104,9 @@ const BaseDialog = ({ if (lockEvents.current) return; if (onShow) { onShow(); - useSettingStore.getState().setSheetKeyboardHandler(false); + if (!enableSheetKeyboardHandler) { + useSettingStore.getState().setSheetKeyboardHandler(false); + } } }} animationType={animation}