React-native-keyboard-aware-scroll-view: Bounce on Focus (Disabling Animation)

Created on 2 Feb 2017  路  12Comments  路  Source: APSL/react-native-keyboard-aware-scroll-view

Is there anyway to disable the animation and directly jump to the focused input? When I use the nextKey to focus next input the animation jumps up and down.

I tried to change this in library with no luck:

feb-01-2017 18-48-50

  scrollToPosition: function (x: number, y: number, animated: bool = false) {
    const scrollView = this.refs._rnkasv_keyboardView.getScrollResponder()
    scrollView.scrollResponderScrollTo({x: x, y: y, animated: false}) // disable animation
  },

May be related to: https://github.com/APSL/react-native-keyboard-aware-scroll-view/issues/82

Most helpful comment

I was able to fix this by adding blurOnSubmit={ false } to all of my inputs.

All 12 comments

Have you tried to disable automatic scrolling? https://github.com/APSL/react-native-keyboard-aware-scroll-view#props

@alvaromb Doesn't this defeat the purpose of using this library?

Well, I think I don't get exactly what you need, sorry!

Can you elaborate? Do you need to disable the automatic scroll or another thing?

I shared a screencast above, when you use the Next key on keyboard it does this weird bounce up then down. I was wondering if there is a way to disable animation and just jump, I know ScrollView has the option to disable animated scroll and insta-jump to location.

Ok, this may be due to this other issue: https://github.com/APSL/react-native-keyboard-aware-scroll-view/issues/82

I'm sending a PR in a moment and it would be great if you could test it to check if it solves your issue.

Sounds good @alvaromb thanks for the help 馃憤

Please use v0.2.7 and test again your issue.

@avallbona works perfect now, great work man!

For me was: automaticallyAdjustContentInsets={false}

I'm having this exact issue in v0.3.0. I'm on IOS as well.

I was able to fix this by adding blurOnSubmit={ false } to all of my inputs.

@haddadnj It gives me a better result, but still bouncing a bit.

Was this page helpful?
0 / 5 - 0 ratings