Skip to content

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

Closed

Description

@Elijen

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.

Activity

  1. Elijen commented on Jun 29, 2018

    @Elijen
    Author

    The original issue with lacking information: #19162

  2. react-native-bot commented on Jun 29, 2018

    @react-native-bot
  3. Elijen commented on Jun 29, 2018

    @Elijen
    Author

    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).

  4. added
    Issue: Author Provided Repro
    and removed on Jun 29, 2018
  5. stale commented on Dec 22, 2018

    @stale

    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.

  6. added
    Stale
    on Dec 22, 2018
  7. Elijen commented on Dec 26, 2018

    @Elijen
    Author

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

  8. removed
    Stale
    on Dec 26, 2018
  9. UZIhuhuhu commented on Mar 18, 2019

    @UZIhuhuhu

    I also encountered this problem.

  10. UZIhuhuhu commented on Mar 19, 2019

    @UZIhuhuhu

    You can introduce a state to turn off autoFocus

  11. added
    Platform: Android
    on Mar 19, 2019
  12. stale commented on Aug 2, 2019

    @stale

    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.

  13. added
    Stale
    on Aug 2, 2019
  14. stale commented on Aug 9, 2019

    @stale

    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.

  15. locked as resolved and limited conversation to collaborators on Aug 9, 2019
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

    BugComponent: FlatListComponent: TextInputIssue: Author Provided ReproPlatform: AndroidStale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions