Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyboardAvoidingView doesn't work properly with TextInput with multiline enabled #27788

Closed
milgron opened this issue Jan 16, 2020 · 6 comments
Closed
Labels
API: Keyboard Bug Component: KeyboardAvoidingView Component: TextInput Related to the TextInput component. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@milgron
Copy link

milgron commented Jan 16, 2020

When you have a KeyboardAvoidingView with a TextInput with multiline=true, the "translating" effect just doesn't work (at least in ios)

React Native version:
0.59.8 (Expo sdk 34.0.1)

Steps To Reproduce

  1. Add a KeyboardAvoidingView, and as a child component, a TextInput with multiline={true}

Describe what you expected to happen:
I expected that this just works well

KeyboardAvoidingView attributes:

  • style={{flex:1}}
  • behavior={Platform.OS === "ios" ? "padding" : null}
  • enabled
  • keyboardVerticalOffset={45}

<TextInput multiline={true} />

@Arwantys
Copy link

Same problem since deleting and reinstalling modules.

@hgezim
Copy link

hgezim commented Feb 1, 2020

@Arwantys Are you suggesting this is a regression?

@hgezim
Copy link

hgezim commented Feb 1, 2020

This seems to be because bottom height for KeyboardAvoidingView is only calculated in _onKeyboardChange when keyboard frame changes not when view size changes:

Keyboard.addListener('keyboardWillChangeFrame', this._onKeyboardChange)

@hgezim
Copy link

hgezim commented Feb 1, 2020

Duplicate of #16826.

@stale
Copy link

stale bot commented May 1, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label May 1, 2020
@stale
Copy link

stale bot commented May 8, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed May 8, 2020
@facebook facebook locked as resolved and limited conversation to collaborators May 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API: Keyboard Bug Component: KeyboardAvoidingView Component: TextInput Related to the TextInput component. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

4 participants