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

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

Closed
McAJBen opened this issue Jan 15, 2021 · 9 comments
Closed
Labels
Component: TextInput Related to the TextInput component. Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@McAJBen
Copy link

McAJBen commented Jan 15, 2021

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(R) Core(TM) 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 />
    );
}
@safaiyeh
Copy link
Contributor

@McAJBen does this happen in release? I've had issues where the keyboard does not pop up in dev mode and I just force it open. Let me know

@safaiyeh safaiyeh added Component: TextInput Related to the TextInput component. Platform: Android Android applications. Needs: Author Feedback and removed Needs: Triage 🔍 labels Jan 16, 2021
@McAJBen
Copy link
Author

McAJBen commented Jan 16, 2021

@safaiyeh This happens in both debug and release, although we first noticed it in release mode.

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Jan 16, 2021
@safaiyeh
Copy link
Contributor

@McAJBen thanks! Could you reference this issue on this thread: react-native-community/releases#214

@safaiyeh safaiyeh removed the Needs: Attention Issues where the author has responded to feedback. label Jan 30, 2021
@mayconline
Copy link

Same problem here.

@danielbucher
Copy link

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

@Glazzes
Copy link

Glazzes commented 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

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 19, 2023
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@fabOnReact
Copy link
Contributor

Do you still experience this issue?

I have four years of experience maintaining facebook/react-native and I specialize in the Text and TextInput components. I currently have 58 facebook/react-native PRs.

If you still experience this issue, I will prepare a patched release with the fix.

Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: TextInput Related to the TextInput component. 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

6 participants