mirror of
https://github.com/standardnotes/mobile.git
synced 2026-02-06 14:01:46 -05:00
feature: dismiss keyboard after sign in/register/passcode creation
This commit is contained in:
@@ -11,7 +11,7 @@ import { ApplicationContext } from '@Root/ApplicationContext';
|
||||
import { SCREEN_INPUT_MODAL_PASSCODE } from '@Screens/screens';
|
||||
import { StyleKitContext } from '@Style/StyleKit';
|
||||
import React, { useContext, useMemo, useRef, useState } from 'react';
|
||||
import { KeyboardType, Platform, TextInput } from 'react-native';
|
||||
import { Keyboard, KeyboardType, Platform, TextInput } from 'react-native';
|
||||
import { Container, Input } from './InputModal.styled';
|
||||
|
||||
type Props = ModalStackNavigationProp<typeof SCREEN_INPUT_MODAL_PASSCODE>;
|
||||
@@ -34,7 +34,7 @@ export const PasscodeInputModal = (props: Props) => {
|
||||
if (!confirmText) {
|
||||
confirmTextRef.current?.focus();
|
||||
} else {
|
||||
// this.submit();
|
||||
Keyboard.dismiss();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import { TableSection } from '@Components/TableSection';
|
||||
import { ApplicationContext } from '@Root/ApplicationContext';
|
||||
import { StyleKitContext } from '@Style/StyleKit';
|
||||
import React, { useCallback, useContext, useEffect, useState } from 'react';
|
||||
import { Keyboard } from 'react-native';
|
||||
import {
|
||||
RegistrationDescription,
|
||||
RegistrationInput,
|
||||
@@ -96,7 +97,7 @@ export const AuthSection = (props: Props) => {
|
||||
setSigningIn(false);
|
||||
return;
|
||||
}
|
||||
|
||||
Keyboard.dismiss();
|
||||
const result = await application!.signIn(
|
||||
email,
|
||||
password,
|
||||
@@ -144,6 +145,7 @@ export const AuthSection = (props: Props) => {
|
||||
'OK'
|
||||
);
|
||||
} else {
|
||||
Keyboard.dismiss();
|
||||
const result = await application!.register(
|
||||
email,
|
||||
password,
|
||||
|
||||
Reference in New Issue
Block a user