react / react/react-native

Android: textInput: secureTextEntry toggle causes keyboard change; keyboard does not automatically come up

未关闭
#27,946 37 条评论 9 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Component: TextInput Issue: Author Provided Repro Needs: React Native Team Attention Platform: Android Platform: iOS
主要语言
C++
星标
127k
派生
25.3k
平均合并
1 天 23 小时
30 天内合并 PR
4

描述

Description:
When enabling the user to toggle the secure text entry flag on a text input, on Android, two issues are occurring:

  1. The keyboard does not automatically come up when rendering; the user must tap on the field.
  2. Tapping the 'eye' icon to toggle the secureTextEntry flag from false to true switches the keyboard type.

React Native version:

System:    OS: Windows 10 10.0.17134
    CPU: (4) ia32 Intel(R) Pentium(R) CPU G4560T @ 2.90GHz
    Memory: 1.65 GB / 7.43 GB
  Binaries:
    Node: 12.10.0 - C:\Program Files (x86)\nodejs\node.EXE
    Yarn: 1.10.1 - C:\Users\mjfiandaca\AppData\Roaming\npm\yarn.CMD
    npm: 6.13.4 - C:\Program Files (x86)\nodejs\npm.CMD
  SDKs:
    Android SDK:
      API Levels: 23, 25, 26, 27, 28
      Build Tools: 23.0.1, 25.0.1, 26.0.3, 27.0.3, 28.0.0, 28.0.3
      System Images: android-23 | Intel x86 Atom, android-23 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: Version  3.5.0.0 AI-191.8026.42.35.6010548
  npmPackages:
    react: 16.8.6 => 16.8.6
    react-native: 0.60.6 => 0.60.6

Steps To Reproduce

  1. Sign onto the provided snack.
  2. Intermittently, the keyboard will not come up (I tested this several times; sometimes, no keyboard, sometimes, app starts, flashes, and then the keyboard comes up).
  3. Tap on the 'eye' icon to toggle the secure text entry.
  4. Notice the keyboard changes.

Expected Results

The keyboard should not change based on the secure text entry value.

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

https://snack.expo.io/@mjfiandaca/toggle-securetextentry

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从链接的 Snack 复现以及 issue 中描述的 Android TextInput 行为开始。分别检查初始渲染和 secureTextEntry 切换,然后验证键盘是否会自动出现,并且在使用眼睛控件时不会改变类型。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, react-native
领域
mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。