3

I am having difficulties with forms in my react-native ios app. I want my inputs to position themselves onFocus so that they will be visible when keyboard opens. I used scrollResponderScrollNativeHandleToKeyboard which was recommended in other issues, but it is really buggy. Sometimes it works sometimes it doesn't.

inputFocused(refName) {
   let scrollResponder = this.scrollView.getScrollResponder();
   scrollResponder.scrollResponderScrollNativeHandleToKeyboard(
   ReactNative.findNodeHandle(this[refName]),
     270,
     true
   );
}
hackio
  • 776
  • 2
  • 8
  • 18

0 Answers0