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.

Bugs that default keyboard opens on the secureTextEntry form on iOS devices

See original GitHub issue

Description

There is a bug that the default keyboard opens under the password form. Additionally, when the keyboard opens, it freezes for 10 or more seconds. I expect the keyboard for password to open, but the default flick keyboard is open when tapping the form. The password form is created by ReactNative.TextInput with secureTextEntry={true} option. This bug is only occur on iOS devices.

React Native version:

System:
    OS: macOS 11.1
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 1.56 GB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.13.0 - ~/.nodebrew/current/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.9 - ~/.nodebrew/current/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.10.0 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.2, DriverKit 20.0, macOS 11.0, tvOS 14.2, watchOS 7.1
    Android SDK:
      API Levels: 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
      Build Tools: 26.0.2, 26.0.3, 28.0.3, 29.0.2
      System Images: android-22 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom, android-24 | Google APIs Intel x86 Atom, android-25 | Google APIs ARM EABI v7a, android-25 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom, android-R | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6514223
    Xcode: 12.2/12B45b - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_275 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz => 0.63.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

  1. Place one normal form and two secureTextEntry forms
  2. Select the password form then open the default keyboard

Expected Results

Open the password keyboard when RN TextInput is in password mode

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

https://gist.github.com/match/a4617371bdc10fb8cedbb2e653f6e85c

image

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:9
  • Comments:7

github_iconTop GitHub Comments

2reactions
xwartzcommented, Mar 4, 2021

Adding this between the 2 consecutive password inputs did solve the problem:

<TextInput style={{ height: 1 }} />

https://github.com/facebook/react-native/issues/21572#issuecomment-444865397

1reaction
tamago3kerancommented, Mar 2, 2021

The similar issue is occurred!

Description

I expect the keyboard for password to open, but the default flick keyboard is open when tapping the form.

React Native version:

System:
    OS: macOS 10.15.7
    CPU: (4) x64 Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz
    Memory: 488.02 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.12.0 - /usr/local/bin/node
    Yarn: 1.19.1 - /usr/local/bin/yarn
    npm: 6.11.3 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.1 - /Users/tamago3keran/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.6953283
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.9 - /usr/local/opt/openjdk@11/bin/javac
    Python: 2.7.15 - /Users/tamago3keran/.pyenv/shims/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1
    react-native: 0.63.4 => 0.63.4
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

  1. On iPhone: Settings -> General -> Keyboard -> Keyboards -> Edit
  2. Select only Japanese - Kana and Emoji
  3. Place one normal form and one secureTextEntry forms
  4. Write testID props including ‘signup’ for TextInput Component.
  5. Select the password form then open the default keyboard
import React from 'react';
import {SafeAreaView, TextInput} from 'react-native';

const App: () => React$Node = () => {
  return (
    <>
      <SafeAreaView>
        <TextInput style={{borderWidth: 1, height: 40}} testID={'signup'} />
        <TextInput style={{borderWidth: 1, height: 40}} secureTextEntry />
      </SafeAreaView>
    </>
  );
};

export default App;

Expected Results

Open the password keyboard when RN TextInput is in password mode

How to resolve

Remove testID or change string not including ‘signup’.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A QWERTY keyboard is not shown when typing a password in ...
newPassword, a QWERTY keyboard is shown. In iOS14.2, if we tap a password text field(It means the text field which isSecureTextEntry is true)...
Read more >
secureTextEntry Disable IOS 13+ Strong Password behavior
Not a optimal solution, but adding blurOnSubmit, and a keyboard Dismiss on submit seems to get the desired behavior back:
Read more >
TextInput - React Native
A foundational component for inputting text into the app via a keyboard. Props provide configurability for several features, ...
Read more >
keyboardavoidingview not working in ios - You.com | The Search ...
disable it on Android (unless you have disabled keyboard/soft input handling in your manifest). Open side panel.
Read more >
A complete guide to TextInput in React Native - LogRocket Blog
Customization · Adding a placeholder · Multiple lines · Maximum length · Unalterable text box · Changing keyboard types · Getting passwords.
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