question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[0.64.0-rc.2] Re-Focusing on TextInput Does Not Open Android's Soft Keyboard

See original GitHub issue

Description

When a TextInput is in focus and Android’s soft keyboard is closed, tapping on the TextInput should re-open the soft keyboard but currently it does not. This has been broken somewhere between 0.63.4 and 0.64.0-rc.2.

React Native version:

System: OS: macOS 11.1 CPU: (12) x64 Intel® Core™ i7-8850H CPU @ 2.60GHz Memory: 303.47 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node Yarn: 1.22.5 - /usr/local/bin/yarn npm: 6.14.10 - ~/.nvm/versions/node/v12.16.1/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.9.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.3, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2 Android SDK: API Levels: 21, 23, 26, 27, 28, 29, 30 Build Tools: 27.0.0, 27.0.3, 28.0.3, 29.0.1, 29.0.2, 29.0.3, 30.0.0, 30.0.0, 30.0.1 System Images: android-23 | Google APIs ARM EABI v7a, android-23 | Google APIs Intel x86 Atom, android-25 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 4.1 AI-201.8743.12.41.6953283 Xcode: 12.3/12C33 - /usr/bin/xcodebuild Languages: Java: 1.8.0_221 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.1 => 17.0.1 react-native: 0.64.0-rc.2 => 0.64.0-rc.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Install a React-Native 0.64.0-rc.2 app with a TextInput on an Android device
  2. Tap on the TextInput
  3. (Android’s soft keyboard should appear and the TextInput should be in focus)
  4. Dismiss the Keyboard by pressing the down arrow at the bottom of the screen
  5. (Android’s soft keyboard should disappear and the TextInput should still be in focus)
  6. Tap on the TextInput

Expected Results

Android’s soft keyboard should be brought up so the user can enter text into the TextInput.

Actual Results

Nothing happens and the user can’t type into the TextInput.

Snack, code example, screenshot, or link to a repository:

function App() {
    return (
        <TextInput />
    );
}

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:11
  • Comments:6

github_iconTop GitHub Comments

3reactions
danielbuchercommented, Nov 18, 2021

I’m getting the same problem here. It started happening after we upgraded from 0.63.4 to 0.64.2.

0reactions
Glazzescommented, Jun 29, 2022

I just had this issue in 0.68.2, it seems that dismissing the keyword with android’s back button hides it, but it does not dismiss it, here’s a workaround that solved this issue for me.

useEffect(() => {
    const kListener = Keyboard.addListener('keyboardDidHide', () => {
      Keyboard.dismiss();
    });

    return () => {
      kListener.remove();
    };
  }, []);

You dismiss it programmatically as it seems to not be dismissed by the back button

Read more comments on GitHub >

github_iconTop Results From Across the Web

Keyboard doesn't show up on focus textInput - Android
I tried doing focus in the componentDidMount and this kind of thing, but nothing works, the android keyboard doesn't want to open ......
Read more >
react-native/CHANGELOG.md - UNPKG
327, - Nested Text Android `onPress` does not work with last character ... to shift to the right when a TextInput is selected...
Read more >
Table 11 :: OIN Linux System - Open Invention Network
Ansible works over SSH and does not require any software or daemons to be installed on remote nodes. Extension modules can be written...
Read more >
Int. J. Mol. Sci., Volume 23, Issue 23 (December-1 2022) - MDPI
The ovarian reserve is finite and begins declining from its peak at mid-gestation until only residual follicles remain as women approach menopause. Reduced ......
Read more >
@react-native/eslint-plugin-specs | Yarn - Package Manager
React Native brings React's declarative UI framework to iOS and Android. With React Native, you use native UI controls and have full access...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found