creativecommons / chooser

The new and improved CC license selection tool.
https://chooser-beta.creativecommons.org
MIT License
98 stars 123 forks source link

[Bug] `Copy` button not working #402

Closed MuluhGodson closed 2 years ago

MuluhGodson commented 2 years ago

Description

The Copy button at the end which lets the user copy the license text does not copy the text. The button label changes correctly, but when pasting, the data seems to not have been copied.

Reproduction

  1. launch chooser
  2. go through steps
  3. click on Copy button to copy the license text and paste somewhere
  4. See error. [What seems to have copied is not pasted]

Expectation

License Text should be pasted.

Additional context

The copy button on chooser-beta.creativecommons.org works correctly.

brylie commented 2 years ago

I am unable to reproduce this bug on the current main branch.

MuluhGodson commented 2 years ago

I am unable to reproduce this bug on the current main branch.

I just did a fresh clone/install. cleared my browser cache and still had the same issue. Also tried with Firefox and experienced it.

MuluhGodson commented 2 years ago

Closing this. Running npm run serve to serve the project runs perfectly without this anomaly. I was serving the project from the generated HTML file using VS Code's liveserver which is why some functions didn't work as expected.

brylie commented 2 years ago

Good point. I should have mentioned how I was running it in my local browser. I believe I was using python -m http.server 8000 in the dist folder to serve the example.html.