jd-opensource / jd-opensource/taro-ui

[字节跳动] AtInput 无法连续输入

Open
#932 25 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.7k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

**问题描述**
使用官网文档的代码,在 AtInput 输入一个字符后,该组件就自动失去焦点,无法连续输入。

iOS 真机上还会出现键盘消失,输入的字符消失的现象。

**复现步骤**
1. git clone git@github.com:hao-li/taro-problem-sample.git
2. yarn
3. yarn build:tt(yarn dev:tt)
4. 点击进入字节跳动小程序问题页
5. 在『标准5个字』处的 AtInput 进行输入

```js
handleInputChange (value) {
this.setState({
inputValue: value
})
// 在小程序中,如果想改变 value 的值,需要 `return value` 从而改变输入框的当前值
return value
}

```

**期望行为**
期望能连续完成输入

**报错信息**
该组件就自动失去焦点,无法连续输入。
iOS 真机上还会出现键盘消失,输入的字符消失的现象。

**系统信息**
```
👽 Taro v1.3.35

Taro CLI 1.3.35 environment info:
System:
OS: macOS 10.15.2
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 11.10.0 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.13.4 - /usr/local/bin/npm
npmPackages:
@tarojs/components: 1.3.35 => 1.3.35
@tarojs/plugin-babel: 1.3.35 => 1.3.35
@tarojs/plugin-csso: 1.3.35 => 1.3.35
@tarojs/plugin-sass: 1.3.35 => 1.3.35
@tarojs/plugin-uglifyjs: 1.3.35 => 1.3.35
@tarojs/router: 1.3.35 => 1.3.35
@tarojs/taro: 1.3.35 => 1.3.35
@tarojs/taro-alipay: 1.3.35 => 1.3.35
@tarojs/taro-h5: 1.3.35 => 1.3.35
@tarojs/taro-swan: 1.3.35 => 1.3.35
@tarojs/taro-tt: 1.3.35 => 1.3.35
@tarojs/taro-weapp: 1.3.35 => 1.3.35
@tarojs/webpack-runner: 1.3.35 => 1.3.35
eslint-config-taro: 1.3.35 => 1.3.35
eslint-plugin-taro: 1.3.35 => 1.3.35
nerv-devtools: ^1.5.6 => 1.5.6
nervjs: ^1.5.6 => 1.5.6
stylelint-config-taro-rn: 1.3.35 => 1.3.35
stylelint-taro-rn: 1.3.35 => 1.3.35
```

- Taro 版本: 1.3.35
- Taro UI 版本: 2.2.4
- 报错平台: tt

**补充信息**
v2.2.1 版本也存在此问题

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.