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

Android: screen not resizing when shifting focus to next empty TextInput #17338

Closed
Agontuk opened this issue Dec 24, 2017 · 12 comments
Closed

Android: screen not resizing when shifting focus to next empty TextInput #17338

Agontuk opened this issue Dec 24, 2017 · 12 comments
Labels
Bug Component: TextInput Related to the TextInput component. Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@Agontuk
Copy link

Agontuk commented Dec 24, 2017

Is this a bug report?

YES

Have you read the Contributing Guidelines?

YES

Environment

Environment:
OS: macOS High Sierra 10.13.2
Node: 8.9.1
Yarn: 1.3.2
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.51.0 => 0.51.0

Target Platform: Android

Steps to Reproduce

  1. Create a blank react-native app and add a scrollview with 7-8 TextInput inside it. (just making sure some of the input will be under keyboard when it shows up)
  2. For the bottom inputs, add blurOnSubmit={false} and onSubmitEditing to focus to the next input when submitting. Example: (Notice the last input value is empty.)
<TextInput
  ref={(r) => { this.pqr = r; }}
  blurOnSubmit={false}
  onSubmitEditing={() => { this.stu.focus(); }}
  value='pqr'
  onChangeText={() => null}
  returnKeyType='next'
/>
<TextInput
  ref={(r) => { this.stu = r; }}
  blurOnSubmit={false}
  onSubmitEditing={() => { this.vwx.focus(); }}
  value='stu'
  onChangeText={() => null}
  returnKeyType='next'
/>
<TextInput
  ref={(r) => { this.vwx = r; }}
  value=''
  onChangeText={() => null}
  returnKeyType='go'
/>
  1. Now focus the input which has a value pqr and press 'Next' from keyboard. Screen will push up the next input which has a value set to stu. Now press 'Next' again, in this case screen doesn't push up the next input because it's value is empty.

Expected Behavior

Next input should be pushed up by screen

Actual Behavior

Next input (ref vwx) is not getting pushed up above the keyboard cause it's initial value is empty.

Demo

input_bug

@stale
Copy link

stale bot commented Feb 22, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. 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 Feb 22, 2018
@react-native-bot react-native-bot added Android Ran Commands One of our bots successfully processed a command. labels Mar 13, 2018
@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Mar 13, 2018
@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Component: TextInput Related to the TextInput component. Android labels Mar 16, 2018
@react-native-bot react-native-bot added Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. labels Mar 18, 2018
@danilobuerger
Copy link
Contributor

Reproducible on react 16.3 / react-native 0.53.3

@stale
Copy link

stale bot commented Jun 30, 2018

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 "For Discussion" or "Good first issue" 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 Jun 30, 2018
@Agontuk
Copy link
Author

Agontuk commented Jun 30, 2018

This is still happening on RN 0.55.4, I didn't have a chance to look for a fix. Hopefully someone else will find a solution and post it here, so that everyone can benefit from it.

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jun 30, 2018
@fghiggi
Copy link

fghiggi commented Oct 1, 2018

Still happening on RN 0.57.1. ScrollView don't focus on empty input, more examples:

focus

Expo example

@RodrigoAWeber
Copy link

RodrigoAWeber commented Oct 11, 2018

@hramos any update?

@ozberkctn
Copy link

Still happening. any solution ?

@hramos
Copy link
Contributor

hramos commented Dec 13, 2018

No update on my part. If there is a pull request that fixes this issue, let me know so we can take a look.

@ozberkctn
Copy link

ozberkctn commented Jan 24, 2019

I found the solution can you take a look @hramos Pull request

@taylorkline
Copy link

@hramos can you remove the PR Submitted tag? The submitted PR was rejected.

@hramos hramos removed the Bug Report label Feb 6, 2019
@hramos hramos removed the Resolution: PR Submitted A pull request with a fix has been provided. label Feb 6, 2019
@stale
Copy link

stale bot commented Aug 2, 2019

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 Aug 2, 2019
@stale
Copy link

stale bot commented Aug 9, 2019

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 Aug 9, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: TextInput Related to the TextInput component. Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. 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

9 participants