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

Further 'copy to clipboard' issues #216

Closed
vdice opened this issue Jul 30, 2024 · 3 comments · Fixed by #217
Closed

Further 'copy to clipboard' issues #216

vdice opened this issue Jul 30, 2024 · 3 comments · Fixed by #217
Assignees
Labels
bug Something isn't working.

Comments

@vdice
Copy link
Contributor

vdice commented Jul 30, 2024

In testing #215 I noticed some more 'copy to clipboard' issues:

  • instances where the 'copy to clipboard' icon is visible but it doesn't appear to actually copy to my clipboard
    • for example: any 'copy-able' snippet from the Quickstart doc
    • (My setup: Browser: Brave, Macbook Air M3)
  • more instances where the 'copy to clipboard' icon is not visible
@bacongobbler bacongobbler self-assigned this Jul 30, 2024
@bacongobbler
Copy link
Contributor

bacongobbler commented Jul 30, 2024

Error from console logs:

ReferenceError: Cannot access 'copyCode' before initialization
    at copyButton.onclick (click-to-copy.js:32:9)
copyButton.onclick @ click-to-copy.js:32

more instances where the 'copy to clipboard' icon is not visible

I'm looking into how this works from docsy's side of things

@bacongobbler
Copy link
Contributor

The issue with the button not appearing appears to stem from the following error log:

Uncaught DOMException: Failed to execute 'add' on 'DOMTokenList': The token provided must not be empty.
    at http://localhost:1313/js/click-to-copy.js:24:26

@bacongobbler bacongobbler linked a pull request Jul 30, 2024 that will close this issue
@bacongobbler
Copy link
Contributor

Found the issue. Addressed in 8c2d397.

@bacongobbler bacongobbler added the bug Something isn't working. label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants