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

Copy PGN button doesn't work #12737

Closed
dav1312 opened this issue Apr 26, 2023 · 6 comments
Closed

Copy PGN button doesn't work #12737

dav1312 opened this issue Apr 26, 2023 · 6 comments

Comments

@dav1312
Copy link

dav1312 commented Apr 26, 2023

Exact URL of where the bug happened

https://lichess.org/broadcast/fide-world-chess-championship-2023/round-12/J8916aqB/Ug3FxCtz

Steps to reproduce the bug

  1. Share & export
  2. Click the "Copy PGN" button

What did you expect to happen?

PGN copied to clipboard

What happened instead?

The PGN wasn't copied to the clipboard

Operating system

Windows 10

Browser and version (or alternate access method)

Chrome 112.0.5615.138 / Microsoft Edge 112.0.1722.58

Additional information

Verified by 1vader in Discord https://discord.com/channels/280713822073913354/693123651272179793/1100715862350106634

@kraktus
Copy link
Member

kraktus commented Apr 26, 2023

Likely introduced by #12719

Console would be useful.

clipboardItem is supposed to be supported by Chrome: https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem but I guess in practice it’s not 😒

@dav1312
Copy link
Author

dav1312 commented Apr 26, 2023

Console would be useful.

I did check the console but since I wasn't getting any errors I couldn't add any logs.

Here you have a screenshot anyway
image

@dav1312
Copy link
Author

dav1312 commented Apr 26, 2023

Note that it seems to work on Firefox 107.0 and 112.2

@lsap
Copy link

lsap commented Apr 26, 2023

Tangential but could not navigate by Tab to aforementioned button after 'Load game' (Chrome, Windows). Every other element in this group focuses correctly via keyboard.

@kraktus
Copy link
Member

kraktus commented Apr 26, 2023

Note that it seems to work on Firefox 107.0 and 112.2

Thanks for testing, found the issue, which is a weird quirk of Chrome

@kraktus
Copy link
Member

kraktus commented Apr 26, 2023

Tangential but could not navigate by Tab to aforementioned button after 'Load game' (Chrome, Windows). Every other element in this group focuses correctly via keyboard.

Thanks for the report, please create a separate issue!

kraktus added a commit to kraktus/lila that referenced this issue Apr 26, 2023
Apparently on Chrome you need to specify the type of the Blob `{ type: 'text/plain' }`.

I've left the `console.log` since it's useful in the future since it should only be triggered when something on our end is not working as expected.

Tested on Chrome, Safari and Firefox

fix lichess-org#12737
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants