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

[DevTools Bug]: copy operations don't work in Chrome #26500

Closed
aynp opened this issue Mar 28, 2023 · 4 comments · Fixed by #26604
Closed

[DevTools Bug]: copy operations don't work in Chrome #26500

aynp opened this issue Mar 28, 2023 · 4 comments · Fixed by #26604

Comments

@aynp
Copy link

aynp commented Mar 28, 2023

Website or app

https://react.dev

Repro steps

  1. Go to components tab.
  2. For any component, try to copy the value in props, hooks etc. to clipboard.

image

How often does this bug happen?

Every time

DevTools package (automated)

No response

DevTools version (automated)

No response

Error message (automated)

No response

Error call stack (automated)

No response

Error component stack (automated)

No response

GitHub query string (automated)

No response

@aynp aynp added Component: Developer Tools Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug labels Mar 28, 2023
@mondaychen
Copy link
Contributor

I did not reproduce this issue. Can you let me know which version of Chrome are you using?

@adarsh-sgh
Copy link

I have same issue on
Chrome: 111.0.5563.146 (Official Build) (arm64)
OS: Mac M1
dev tools version 4.27.3 (3/22/2023)
also tried dev tools build from main branch.

@aynp
Copy link
Author

aynp commented Mar 28, 2023

I'm running Chromium Version 111.0.5563.110 (Official Build) Arch Linux (64-bit). I also tried Google Chrome Version 111.0.5563.146 (Official Build) (64-bit) and had the same issue.
I am using DevTools 4.27.3 (3/22/2023). I also tried building the extension from the source.

@mondaychen
Copy link
Contributor

For some reason I can't reproduce this issue on my Chrome v111, but I get the same error on Chrome Canary v113.
Looks like React DevTools is using a very old clipboard library. We'll fix it in next patch!

@hoxyq hoxyq self-assigned this Mar 29, 2023
@mondaychen mondaychen removed the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Mar 30, 2023
hoxyq added a commit that referenced this issue Apr 12, 2023
Fixes #26500

## Summary
- No more using `clipboard-js` from the backend side, now emitting
custom `saveToClipboard` event, also adding corresponding listener in
`store.js`
- Not migrating to `navigator.clipboard` api yet, there were some issues
with using it on Chrome, will add more details to
#26539

## How did you test this change?
- Tested on Chrome, Firefox, Edge
- Tested on standalone electron app: seems like context menu is not
expected to work there (cannot right-click on value, the menu is not
appearing), other logic (pressing on copy icon) was not changed
kassens pushed a commit to kassens/react that referenced this issue Apr 17, 2023
…#26604)

Fixes facebook#26500

## Summary
- No more using `clipboard-js` from the backend side, now emitting
custom `saveToClipboard` event, also adding corresponding listener in
`store.js`
- Not migrating to `navigator.clipboard` api yet, there were some issues
with using it on Chrome, will add more details to
facebook#26539

## How did you test this change?
- Tested on Chrome, Firefox, Edge
- Tested on standalone electron app: seems like context menu is not
expected to work there (cannot right-click on value, the menu is not
appearing), other logic (pressing on copy icon) was not changed
EdisonVan pushed a commit to EdisonVan/react that referenced this issue Apr 15, 2024
…#26604)

Fixes facebook#26500

## Summary
- No more using `clipboard-js` from the backend side, now emitting
custom `saveToClipboard` event, also adding corresponding listener in
`store.js`
- Not migrating to `navigator.clipboard` api yet, there were some issues
with using it on Chrome, will add more details to
facebook#26539

## How did you test this change?
- Tested on Chrome, Firefox, Edge
- Tested on standalone electron app: seems like context menu is not
expected to work there (cannot right-click on value, the menu is not
appearing), other logic (pressing on copy icon) was not changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment