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

TextArea在有maxLength的情况下,光标选中非最后一位仍可以输入且会替换掉最后一位字符 #1481

Open
qwe284953354 opened this issue Sep 20, 2023 · 2 comments
Labels
upstream 上游依赖的问题,比如 Taro、小程序或者其他第三方依赖

Comments

@qwe284953354
Copy link

NutUI React 包名

@nutui/nutui-react-taro

NutUI React 版本号

2.0.16

平台

weapp

重现链接

https://nutui.jd.com/h5/react/2x/#/zh-CN/guide/intro-react

重现步骤

直接微信扫码首页二维码进入TextArea模块在有maxLength的情况下即可复现

期望的结果是什么?

正常实现maxLength功能,且达到上限时在任意位置均不可输入

实际的结果是什么?

光标选中非最后一位的情况下仍可以输入且会替换掉最后一位字符

环境信息

System:
OS: Windows 10 10.0.22621
CPU: (16) x64 AMD Ryzen 7 7840HS w/ Radeon 780M Graphics
Memory: 1.94 GB / 15.23 GB
Binaries:
Node: 18.16.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD
pnpm: 8.6.7 - C:\Program Files\nodejs\pnpm.CMD
Browsers:
Edge: Spartan (44.22621.2283.0), Chromium (117.0.2045.31)
Internet Explorer: 11.0.22621.1
npmPackages:
@nutui/nutui-react: ^2.0.16 => 2.0.17

其他补充信息

"react": "^18.0.0",
"@tarojs/taro": "3.6.11",

@qwe284953354 qwe284953354 changed the title TextArea在有maxLength的情况下,光标选中非最后一位的情况下仍可以输入且会替换掉最后一位字符 TextArea在有maxLength的情况下,光标选中非最后一位仍可以输入且会替换掉最后一位字符 Sep 20, 2023
@mjkohoh
Copy link

mjkohoh commented Sep 26, 2023

我在tdesign-miniprogram项目中也复现了这个问题,怎么感觉这个锅只能丢给腾讯了。

@qwe284953354
Copy link
Author

我在tdesign-miniprogram项目中也复现了这个问题,怎么感觉这个锅只能丢给腾讯了。

卧槽 确实

@eiinu eiinu added the upstream 上游依赖的问题,比如 Taro、小程序或者其他第三方依赖 label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream 上游依赖的问题,比如 Taro、小程序或者其他第三方依赖
Projects
None yet
Development

No branches or pull requests

3 participants