Skip to content

Commit 35d6b9e

Browse files
kangyunusatya164
andauthored
fix: don't use deprecated currentlyFocusedField (facebook#8365)
Co-authored-by: Satyajit Sahoo <[email protected]>
1 parent 95b044e commit 35d6b9e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/stack/src/views/KeyboardManager.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ export default class KeyboardManager extends React.Component<Props> {
3535

3636
this.clearKeyboardTimeout();
3737

38-
const input = TextInput.State.currentlyFocusedField();
38+
// @ts-ignore
39+
const input = TextInput.State.currentlyFocusedInput
40+
? // @ts-ignore
41+
TextInput.State.currentlyFocusedInput()
42+
: TextInput.State.currentlyFocusedField();
3943

4044
// When a page change begins, blur the currently focused input
4145
TextInput.State.blurTextInput(input);

0 commit comments

Comments
 (0)