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

Keyboard.dismiss and TextInput.blur not working if used with FlatList #19978

Closed
Elijen opened this issue Jun 29, 2018 · 9 comments
Closed

Keyboard.dismiss and TextInput.blur not working if used with FlatList #19978

Elijen opened this issue Jun 29, 2018 · 9 comments
Labels
Bug Component: FlatList Component: TextInput Related to the TextInput component. Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@Elijen
Copy link

Elijen commented Jun 29, 2018

Environment

Environment:
OS: macOS 10.14
Node: 10.1.0
Yarn: 0.27.5
npm: 6.1.0
Watchman: 4.7.0
Xcode: Xcode 9.4.1 Build version 9F2000
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: https://github.com/expo/react-native/archive/sdk-28.0.0.tar.gz => 0.55.4

Description

Keyboard.dismiss and TextInput.blur sometimes does not have any effect.

Reproducible Demo

https://snack.expo.io/@peller/keyboard-dismiss-bug

  1. Press TextInput.focus() button
  2. Manually focus the 1st or the 3rd input by tapping it
  3. TextInput.blur() or Keyboard.dismiss() buttons now won't work.
@Elijen
Copy link
Author

Elijen commented Jun 29, 2018

The original issue with lacking information: #19162

@react-native-bot

This comment has been minimized.

@react-native-bot react-native-bot added 📋No Environment Info Component: TextInput Related to the TextInput component. labels Jun 29, 2018
@Elijen
Copy link
Author

Elijen commented Jun 29, 2018

This does not happen if keyboardShouldPersistTaps="always" prop is set on the FlatList (even though onPress that is calling Keyboard.dismiss() is called for both never and always values).

@hramos hramos added Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. and removed 📋No Environment Info labels Jun 29, 2018
@stale
Copy link

stale bot commented Dec 22, 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 Dec 22, 2018
@Elijen
Copy link
Author

Elijen commented Dec 26, 2018

@react-native-bot Go away, bot! 💩

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Dec 26, 2018
@hramos hramos removed the Bug Report label Feb 6, 2019
@UZIhuhuhu
Copy link

I also encountered this problem.

@UZIhuhuhu
Copy link

UZIhuhuhu commented Mar 19, 2019

You can introduce a state to turn off autoFocus

@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 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: FlatList Component: TextInput Related to the TextInput component. Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Platform: Android Android applications. 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

5 participants