spinkube / documentation

Site and Docs for the SpinKube community project
https://www.spinkube.dev/
Apache License 2.0
15 stars 24 forks source link

Further 'copy to clipboard' issues #216

Closed vdice closed 1 month ago

vdice commented 1 month ago

In testing https://github.com/spinkube/documentation/pull/215 I noticed some more 'copy to clipboard' issues:

bacongobbler commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

Found the issue. Addressed in https://github.com/spinkube/documentation/pull/217/commits/8c2d3970174706623272c550a3e3a15a14bf6940.