react-native icon indicating copy to clipboard operation
react-native copied to clipboard

[IOS] [FIXED] - Fix TextInput's maxLength limit when use a non-English input method

Open 2017398956 opened this issue 2 years ago • 6 comments

Summary:

When using a non-English input method, and the TextInput’s maxLength is set, some temporary characters are also added to the maximum length, which should not be the case.

Changelog:

[IOS] [FIXED] - Fix TextInput's maxLength limit when use a non-English input method.

Test Plan:

Before fixed I can't input '65432黄'. 'huang' is the Chinese word for '黄'.

253845058-16a40b35-95a3-4814-ba9c-481e02633f4e

After fixed TextInput's maxLength can work for English input and a non-English input:

253845168-974162ae-7d0e-4840-8143-3a8bf617655d

2017398956 avatar Jul 26 '23 07:07 2017398956

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,889,597 -2
android hermes armeabi-v7a 7,940,123 -1
android hermes x86 9,287,481 +1
android hermes x86_64 9,191,300 +0
android jsc arm64-v8a 9,479,590 +0
android jsc armeabi-v7a 8,422,682 -2
android jsc x86 9,463,163 +0
android jsc x86_64 9,780,068 -2

Base commit: c1eec4cc51c15037afea25351ffa0ea3a0f848f0 Branch: main

analysis-bot avatar Jul 26 '23 07:07 analysis-bot

这个问题能得到解决吗,我也遇到了限制20个字符长度,由于我是中国用户,ios特殊的输入法会导致计算中文拼音而超长,但是实际上我并没有输入超过20个字

liangbule avatar Nov 09 '23 10:11 liangbule

这个问题能得到解决吗,我也遇到了限制20个字符长度,由于我是中国用户,ios特殊的输入法会导致计算中文拼音而超长,但是实际上我并没有输入超过20个字

好久没人处理这个 pr 了,你可以用这个试试,好像 0.72+ 的都没问题,如果 crash 了就算了,可能会有冲突问题 https://www.npmjs.com/package/react-native-textinput-maxlength-fixed

2017398956 avatar Nov 09 '23 10:11 2017398956

这个问题能得到解决吗,我也遇到了限制20个字符长度,由于我是中国用户,ios特殊的输入法会导致计算中文拼音而超长,但是实际上我并没有输入超过20个字

好久没人处理这个 pr 了,你可以用这个试试,好像 0.72+ 的都没问题,如果 crash 了就算了,可能会有冲突问题 https://www.npmjs.com/package/react-native-textinput-maxlength-fixed

我的版本比较低,感谢大佬,我试试

liangbule avatar Nov 09 '23 10:11 liangbule

This PR 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[bot] avatar May 08 '24 05:05 github-actions[bot]

Didn't anyone review this?

2017398956 avatar May 08 '24 05:05 2017398956