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在特定情形下无法用Ctrl+C复制的BUG #19259

Closed
1 task done
haoforliu opened this issue Oct 17, 2019 · 5 comments
Closed
1 task done

Input在特定情形下无法用Ctrl+C复制的BUG #19259

haoforliu opened this issue Oct 17, 2019 · 5 comments

Comments

@haoforliu
Copy link

haoforliu commented Oct 17, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

鼠标从右往左选中输入框中的所有内容,使用快捷键Ctrl+C进行复制,然后把复制内容粘贴到别处,发现内容不是刚刚复制的内容

What is expected?

按重现步骤的操作可以进行复制

What is actually happening?

不能进行复制

Environment Info
antd 3.24.0
React 16.10
System windows10
Browser Chrome 77
@afc163
Copy link
Member

afc163 commented Oct 17, 2019

disabled Input 无法选中文字,自然也不能复制,和原生 input 逻辑一致。

@afc163 afc163 closed this as completed Oct 17, 2019
@haoforliu
Copy link
Author

@afc163
disabled是无法进行输入,不代表不能选中文字进行复制吧。而且事实是可以进行文字选中的。

@haoforliu
Copy link
Author

@afc163
好吧,我刚刚用原生input试了下,也是这样的,确实不是antd的问题

@afc163
Copy link
Member

afc163 commented Oct 17, 2019

取决于浏览器的实现策略,我本地测试 chrome 是可选的,firefox 是不可选的,我们是直接继承 input 的逻辑,确实没做修改。

@haoforliu
Copy link
Author

@afc163
刚刚试了chrome在这种情况下,移除placeholder属性,就可以进行复制了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants