Skip to content

Commit

Permalink
fix: new room page is misaligned
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Nov 8, 2023
1 parent 437e273 commit 786b5d1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/hooks/useAutoFocusInput.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {useFocusEffect} from '@react-navigation/native';
import {useCallback, useContext, useEffect, useRef, useState} from 'react';
import {InteractionManager} from 'react-native';
import CONST from '@src/CONST';
import * as Expensify from '@src/Expensify';

Expand All @@ -16,8 +17,10 @@ export default function useAutoFocusInput() {
if (!isScreenTransitionEnded || !isInputInitialized || !inputRef.current || !isSplashHidden) {
return;
}
inputRef.current.focus();
setIsScreenTransitionEnded(false);
InteractionManager.runAfterInteractions(() => {
inputRef.current.focus();
setIsScreenTransitionEnded(false);
});
}, [isScreenTransitionEnded, isInputInitialized, isSplashHidden]);

useFocusEffect(
Expand Down

0 comments on commit 786b5d1

Please sign in to comment.