carbon icon indicating copy to clipboard operation
carbon copied to clipboard

Copy Plain URL doesn't copy anything

Open OnkelTem opened this issue 3 years ago • 5 comments

Describe the bug Copying "Plain URL" doesn't work.

To Reproduce Steps to reproduce the behavior:

  1. Open https://carbon.now.sh/
  2. Select the "Plain URL" item from the copy menu:

image

  1. 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

OnkelTem avatar May 22 '22 19:05 OnkelTem

Does your browser have access to the clipboard? This works great on all browsers I have access to.

mfix22 avatar Jun 05 '22 18:06 mfix22

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 avatar Jun 05 '22 23:06 OnkelTem

@OnkelTem Have tried after logging in? Because I am seeing the same error until I login to my account.

thevinitgupta avatar Jun 23 '22 09:06 thevinitgupta

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).

mfix22 avatar Nov 07 '22 01:11 mfix22

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?

agilityhawk avatar Jan 22 '23 14:01 agilityhawk