mobile: fix pin input hide behind keyboard on session expiry sheet (#3624)

This commit is contained in:
Ammar Ahmed
2023-10-24 15:57:20 +05:00
committed by GitHub
parent 942d2f7a4e
commit 2b917c7eca
2 changed files with 8 additions and 3 deletions

View File

@@ -142,9 +142,9 @@ export const SessionExpired = () => {
passwordInputRef.current?.focus();
setFocused(true);
}}
enableSheetKeyboardHandler={true}
visible={true}
>
<SheetProvider context="two_factor_verify" />
<View
style={{
width: focused ? "100%" : "99.9%",
@@ -237,6 +237,8 @@ export const SessionExpired = () => {
</View>
<Toast context="local" />
<Dialog context="session_expiry" />
<SheetProvider context="two_factor_verify" />
</BaseDialog>
)
);

View File

@@ -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}