From 8c8062ac011fed7da3a96deebe7f3d820b84c6ed Mon Sep 17 00:00:00 2001 From: Youssef Muhamad Date: Wed, 22 Jul 2020 16:36:15 -0300 Subject: [PATCH] [FIX] Keyboard not focusing on TwoFactor component (#2314) * Improve 2fa visual hierarchy * Show 2fa keyboard by scheduling focus method after all interactions * Remove unrelated styling improvements Co-authored-by: Diego Mello --- app/containers/TwoFactor/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/containers/TwoFactor/index.js b/app/containers/TwoFactor/index.js index e59ed0c1..011b5e3d 100644 --- a/app/containers/TwoFactor/index.js +++ b/app/containers/TwoFactor/index.js @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { View, Text } from 'react-native'; +import { View, Text, InteractionManager } from 'react-native'; import _ from 'lodash'; import PropTypes from 'prop-types'; import { sha256 } from 'js-sha256'; @@ -99,6 +99,7 @@ const TwoFactor = React.memo(({ theme, isMasterDetail }) => { InteractionManager.runAfterInteractions(() => e?.getNativeRef()?.focus())} returnKeyType='send' autoCapitalize='none' onChangeText={setCode}