carbon
carbon copied to clipboard
Copy Plain URL doesn't copy anything
Describe the bug Copying "Plain URL" doesn't work.
To Reproduce Steps to reproduce the behavior:
- Open https://carbon.now.sh/
- Select the "Plain URL" item from the copy menu:

- Open a new tab and paste the URL. It pastes just the site's root URL: https://carbon.now.sh/
Expected behavior A link to the snippet would get copied.
Info (please complete the following information):
- OS [e.g. macOS, Linux, Windows, iOS]: Linux
- Browser [e.g. Chrome, Safari, Firefox]: Chrome 100
Does your browser have access to the clipboard? This works great on all browsers I have access to.
Of course it has. It just doesn't copy ~~anything~~ the full URL. I can make a video.
UPDATE https://www.youtube.com/watch?v=TFJFG5kp65o
@OnkelTem Have tried after logging in? Because I am seeing the same error until I login to my account.
Thanks for the helpful reproduction video @OnkelTem! This should be an easy fix (I imagine you would be able to fix it yourself if you are interested).
Hello. I was looking to pick this up and have been able to reproduce it on the prod site (thanks to the vid by @OnkelTem). However, in order to reproduce this locally and confirm my fix, I wanted to go through the flow and receive the API response that saves the snippet but am unable to locate the API/server-side code where this response is supposed to come from.
Since I was unable to find it in this code, I'm assuming that API and backend code for this is somewhere else? @mfix22 - Could you provide further insights into this assumption please?
Thanks in advance!
P.S: Additionally, I was also hoping if we could add a local/placeholder .env file that just lists all the ENV variables that are consumed by this code, in case we wanted to set them up locally as well?