Skip to content

Commit 97fc6a6

Browse files
committed
Check if there is a focused field before trying to scroll to it
1 parent 0870c8d commit 97fc6a6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/KeyboardAwareMixin.js

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ const KeyboardAwareMixin = {
3636
})
3737
// Automatically scroll to focused TextInput
3838
const currentlyFocusedField = TextInput.State.currentlyFocusedField()
39+
if (!currentlyFocusedField) {
40+
return
41+
}
3942
UIManager.viewIsAncestorOf(
4043
currentlyFocusedField,
4144
this.getScrollHandle().getScrollResponder().getInnerViewNode(),

0 commit comments

Comments
 (0)