Skip to content

Commit fb40649

Browse files
authored
Merge pull request #450 from rkdqudtjs1/patch-3
currentlyFocusedField => currentlyFocusedInput
2 parents 0301d5e + 0dc8435 commit fb40649

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/KeyboardAwareHOC.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ function KeyboardAwareHOC(
369369
keyboardSpace -= _KAM_DEFAULT_TAB_BAR_HEIGHT
370370
}
371371
this.setState({ keyboardSpace })
372-
const currentlyFocusedField = TextInput.State.currentlyFocusedField()
372+
const currentlyFocusedField = TextInput.State.currentlyFocusedInput ? findNodeHandle(TextInput.State.currentlyFocusedInput()) : TextInput.State.currentlyFocusedField()
373373
const responder = this.getScrollResponder()
374374
if (!currentlyFocusedField || !responder) {
375375
return
@@ -492,7 +492,7 @@ function KeyboardAwareHOC(
492492
}
493493

494494
update = () => {
495-
const currentlyFocusedField = TextInput.State.currentlyFocusedField()
495+
const currentlyFocusedField = TextInput.State.currentlyFocusedInput ? findNodeHandle(TextInput.State.currentlyFocusedInput()) : TextInput.State.currentlyFocusedField()
496496
const responder = this.getScrollResponder()
497497

498498
if (!currentlyFocusedField || !responder) {

0 commit comments

Comments
 (0)