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

Input的value同步时,IOS下原生九宫格中文输入法会失去焦点 #7226

Closed
vdfor opened this issue Aug 1, 2020 · 5 comments · Fixed by #8591
Closed

Input的value同步时,IOS下原生九宫格中文输入法会失去焦点 #7226

vdfor opened this issue Aug 1, 2020 · 5 comments · Fixed by #8591
Labels
F-react Framework - React T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x
Milestone

Comments

@vdfor
Copy link
Contributor

vdfor commented Aug 1, 2020

相关平台

支付宝小程序

复现仓库

https://github.com/vdfor/taro-issue-demo-004
小程序基础库: 1.24.0
使用框架: React

复现步骤

最小化仓库运行后,使用iphone预览,输入法切换为中文九宫格,点击 mno 按钮,会发现很快失去焦点,且输入框出现字母。

主要复现代码如下:

import React, { FC,useState } from 'react'
import { View, Input } from '@tarojs/components'
import styles from './index.module.scss'

const Index:FC = () => {
  const [text, setText] = useState('');

  const onInput = (e:any) => {
    setText(e.detail.value);
  }

  return (
    <View className={styles.wrap}>
      <Input value={text} onInput={onInput} className={styles.input} placeholder='请输入...' />
          <View>输入的值:{text}</View>
    </View>
  )
}

export default Index;

期望结果

在IOS下可以正常使用

实际结果

九宫格输入法无法使用

环境信息

Taro CLI 3.0.6 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 12.18.2 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.4 - C:\Users\vdfor\AppData\Roaming\npm\yarn.CMD
      npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD

补充信息

在IOS13.2.2(iphonex) 和 IOS12.3.1 (iphone6plus)均出现此问题。

此问题与 #7225 应该是同一问题

@taro-bot2 taro-bot2 bot added F-react Framework - React T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x labels Aug 1, 2020
@Chen-jj Chen-jj added this to the 3.0.10 milestone Sep 3, 2020
@Chen-jj Chen-jj modified the milestones: 3.0.10, 3.0.11 Sep 10, 2020
@ZakaryCode ZakaryCode modified the milestones: 3.0.11, 3.0.12 Sep 18, 2020
@Chen-jj Chen-jj modified the milestones: 3.0.15, 3.0.16 Oct 23, 2020
@Chen-jj Chen-jj modified the milestones: 3.0.16, 3.0.17 Nov 5, 2020
@Chen-jj Chen-jj modified the milestones: 3.0.17, 3.0.18 Nov 17, 2020
@Chen-jj Chen-jj modified the milestones: 3.0.18, 3.0.19 Dec 4, 2020
@Chen-jj Chen-jj modified the milestones: 3.0.19, 3.0.20, 3.0.22 Dec 19, 2020
@Chen-jj Chen-jj modified the milestones: 3.0.22, 3.1.0 Jan 4, 2021
@YoursOwen
Copy link

请问 ios下九宫格这个问题解决了吗?

@Chen-jj Chen-jj removed this from the 3.1.0 milestone Jan 28, 2021
@Chen-jj
Copy link
Contributor

Chen-jj commented Jan 28, 2021

设置这个属性应该就可以了:

image

3.0.26 或 3.1.0-beta.5 开始支持设置此属性

@Chen-jj Chen-jj added this to the 3.0.26 milestone Jan 28, 2021
@shenggen1987
Copy link

我是设置了 type='number' 才有你的问题,奇怪了,不设置就是好的

@shenggen1987
Copy link

有遇到有时输入不了中文的情况吗? 感觉时好时坏

@shenggen1987
Copy link

@Chen-jj enableNative怎么使用?<Input enableNative={true} /> 还是<Input enableNative="true" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants