ant-design-vue icon indicating copy to clipboard operation
ant-design-vue copied to clipboard

After textarea sets autoSize, the cursor will move to the end of continuous input of text.

Open qpxtWhite opened this issue 3 years ago • 3 comments
trafficstars

  • [ ] 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

Edit on CodeSandbox

Steps to reproduce

1、a-textarea设定 :auto-size="{ minRows: 2, maxRows: 5 }" 2、在输入框中将光标定位到文案中间 3、连续快速的输入中文 a

What is expected?

正常在文案中间插入字符

What is actually happening?

光标会移动到最后,导致输入位置错误

qpxtWhite avatar Aug 26 '22 07:08 qpxtWhite

mac 搜狗没有复现

tangjinzhou avatar Sep 01 '22 08:09 tangjinzhou

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,提前感谢和期待您的贡献。

github-actions[bot] avatar Sep 01 '22 08:09 github-actions[bot]

Add one console line here: image

And get the following result: a currentStart suddenly jump to 111

I dont know why

qpxtWhite avatar Sep 02 '22 07:09 qpxtWhite

我也出现了和你一模一样的问题,我的操作方式是这样的:比如同时不停的按 B(或者其他字母也行)+空格键

QQ截图20220922100309 后面我发现导致此原因主要是 因为加了 :autosize="{ minRows: 4, maxRows: 20 }" 这句,去掉后就不会出现

hymsnow avatar Sep 22 '22 02:09 hymsnow

在ResizableTextArea.tsx文件中,会根据resizeStatus设置overflow属性; 经过一番调试,发现去掉这个overflow样式变化之后,不会再出现光标乱跳的问题,如截图这段代码: image 我不确定这个overflow属性是用来干嘛的,能不能去掉,去掉会不会影响其他功能; 我在项目里复制了一份textarea组件,去掉了红框中的代码,暂时跑着没问题

qpxtWhite avatar Oct 02 '22 15:10 qpxtWhite

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

github-actions[bot] avatar Dec 02 '22 02:12 github-actions[bot]

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.

github-actions[bot] avatar Dec 11 '23 00:12 github-actions[bot]