ant-design-vue
ant-design-vue copied to clipboard
After textarea sets autoSize, the cursor will move to the end of continuous input of text.
- [ ] I have searched the issues of this repository and believe that this is not a duplicate.
Version
3.3.0-beta.2
Environment
win10\chrome\vue3
Reproduction link
Steps to reproduce
1、a-textarea设定 :auto-size="{ minRows: 2, maxRows: 5 }"
2、在输入框中将光标定位到文案中间
3、连续快速的输入中文

What is expected?
正常在文案中间插入字符
What is actually happening?
光标会移动到最后,导致输入位置错误
mac 搜狗没有复现
Hello @qpxtWhite. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch, fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!
你好 @qpxtWhite,我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支,务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。
Add one console line here:

And get the following result:
currentStart suddenly jump to 111
I dont know why
我也出现了和你一模一样的问题,我的操作方式是这样的:比如同时不停的按 B(或者其他字母也行)+空格键
后面我发现导致此原因主要是 因为加了 :autosize="{ minRows: 4, maxRows: 20 }" 这句,去掉后就不会出现
在ResizableTextArea.tsx文件中,会根据resizeStatus设置overflow属性;
经过一番调试,发现去掉这个overflow样式变化之后,不会再出现光标乱跳的问题,如截图这段代码:
我不确定这个overflow属性是用来干嘛的,能不能去掉,去掉会不会影响其他功能;
我在项目里复制了一份textarea组件,去掉了红框中的代码,暂时跑着没问题
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.