Skip to content

screen bouncing while focusing on of the input #418

Open
@ganesh-papola

Description

@ganesh-papola

Screen is bouncing up and down when jumping to any text input

Activity

jpamarohorta

jpamarohorta commented on Jan 22, 2020

@jpamarohorta

I'm having the same problem

louisholley

louisholley commented on Jan 31, 2020

@louisholley

have you got scrollEnabled={false} on the input? I took it off and it's working better

ganesh-papola

ganesh-papola commented on Feb 3, 2020

@ganesh-papola
Author

@louisholley well that should work but i need scroll enabled, so can't turn it off

thijs-qv

thijs-qv commented on Apr 8, 2020

@thijs-qv

Try replacing

setTimeout(() => {
  if (!this.mountedComponent) {
    return
  }
  const responder = this.getScrollResponder()
  responder &&
    responder.scrollResponderScrollNativeHandleToKeyboard(
      reactNode,
      extraHeight,
      true
    )
}, keyboardOpeningTime)

with

if (this.mountedComponent) {
  UIManager.measureLayout(
    reactNode,
    0,
    () => {},
    (x, y, width, height) => {
      findNodeHandle(this._rnkasv_keyboardView), (x, y, width, height) => {
        this._rnkasv_keyboardView.scrollToPosition(0, parseInt(y) - height - extraHeight, true);
    }
  });
}

inside KeyboardAwareHOC.scrollToFocusedInput()

peterson79

peterson79 commented on Apr 13, 2020

@peterson79

@thijs-qv solution worked for me, thank you!

steve228uk

steve228uk commented on Apr 15, 2020

@steve228uk

Thanks @thijs-qv. Has a PR been submitted for this?

linked a pull request that will close this issue on Apr 16, 2020
thijs-qv

thijs-qv commented on Apr 16, 2020

@thijs-qv

I've just submitted a PR. Not sure if this library is actively maintained though.

JoseLion

JoseLion commented on Apr 22, 2020

@JoseLion

I managed to solve it by setting keyboardOpeningTime={Number.MAX_SAFE_INTEGER}, but it's just a workaround.

ntk0104

ntk0104 commented on Jul 15, 2020

@ntk0104

I managed to solve it by setting keyboardOpeningTime={Number.MAX_SAFE_INTEGER}, but it's just a workaround.

Thank you very much, you saved my day

serhiimahdiuk

serhiimahdiuk commented on Jul 23, 2020

@serhiimahdiuk

I managed to solve it by setting keyboardOpeningTime={Number.MAX_SAFE_INTEGER}, but it's just a workaround.

Solved! Thanks

cihanbas

cihanbas commented on Aug 18, 2020

@cihanbas
 <KeyboardAwareScrollView
      scrollEnabled={true}
      extraScrollHeight={-64}
      keyboardShouldPersistTaps="handled"
      enableAutoAutomaticScroll={false}
      enableOnAndroid={true}
      keyboardOpeningTime={Number.MAX_SAFE_INTEGER}
      {...props}>
      {props.children}
</KeyboardAwareScrollView>

it is work for me

keremcubuk

keremcubuk commented on Jan 27, 2021

@keremcubuk

I managed to solve it by setting keyboardOpeningTime={Number.MAX_SAFE_INTEGER}, but it's just a workaround.

You saved our lives. Me and my pair friend spent a week for keyboards problems of react-native. We replaced the component for android problem but in IOS we spent too many for bouncing problem. God bless you! 🚀 :godmode:

mgwedd

mgwedd commented on Mar 15, 2021

@mgwedd

I managed to solve it by setting keyboardOpeningTime={Number.MAX_SAFE_INTEGER}, but it's just a workaround.

This also solved it for me. I'd like to know what the root cause is though and how to avoid it though.

14 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @steve228uk@jpamarohorta@JoseLion@louisholley@peterson79

      Issue actions

        screen bouncing while focusing on of the input · Issue #418 · APSL/react-native-keyboard-aware-scroll-view