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

Typography copyable not refreshing text to be copied #48075

Closed
janarvaezkng opened this issue Mar 25, 2024 · 7 comments · Fixed by #48347
Closed

Typography copyable not refreshing text to be copied #48075

janarvaezkng opened this issue Mar 25, 2024 · 7 comments · Fixed by #48347
Labels
🐛 Bug Ant Design Team had proved that this is a bug.

Comments

@janarvaezkng
Copy link

Reproduction link

Edit on CodeSandbox

Steps to reproduce

in the sandbox:

  • click change url
  • click copy not working
  • paste link in notepad: link is the previous url
  • click copy working
  • paste link in notepad: link is correct

What is expected?

clicking the button to copy actually copies the latest value

What is actually happening?

The copy text is somehow memoised to de previous value

Environment Info
antd 5.12.4
React react 18
System macos
Browser chrome
@zombieJ
Copy link
Member

zombieJ commented Mar 25, 2024

Pls set your codesandbox to public : )

@zombieJ zombieJ added 🤔 Need Reproduce We cannot reproduce your problem and removed unconfirmed labels Mar 25, 2024
Copy link
Contributor

Hello @janarvaezkng. Please provide a online reproduction by forking codesandbox of antd@5.x or antd@4.x, or provide a minimal GitHub repository. Issues labeled by Need Reproduce will be closed if no activities in 3 days.

你好 @janarvaezkng,我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击这里创建一个 antd@5.xantd@4.x 的 codesandbox,或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。

什么是最小化重现,为什么这是必需的?

@janarvaezkng
Copy link
Author

Pls set your codesandbox to public : )

😬 sorry! done

@MadCcc MadCcc added 🐛 Bug Ant Design Team had proved that this is a bug. and removed 🤔 Need Reproduce We cannot reproduce your problem labels Mar 27, 2024
@CooperHash
Copy link
Contributor

I'm not sure if it's because of useMemo.

@janarvaezkng
Copy link
Author

janarvaezkng commented Apr 3, 2024

I've updated the codesandbox. If you now hover, you'll see that the tooltip shows the correct url, but it's still not copying it correctly.
Is there an extra internal memo that could be doing this?

@LingJinT
Copy link
Contributor

LingJinT commented Apr 8, 2024

I will try to fix it

@crazyair
Copy link
Member

crazyair commented Apr 8, 2024

Because the children have changed, copying is not a problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Ant Design Team had proved that this is a bug.
Projects
None yet
6 participants