#49434 closed feature request (duplicate)
Copy link functionality in Media not working
Reported by: | sharduld | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Media | Keywords: | |
Focuses: | ui, javascript | Cc: |
Description
- When you upload any WordPress media, a link of the uploaded media is displayed in the right sidebar of the modal(as highlighted in the attached screenshot). The label of the link is set as "Copy Link", but clicking on 'Copy Link' does not copy the link to clipboard.
I am not sure about the relevant JS file to add this code, so adding the code here-
jQuery(document).on('click', 'label[for="attachment-details-two-column-copy-link"]', function(){ var copyText = document.getElementById("attachment-details-two-column-copy-link"); /* Select the text field */ copyText.select(); copyText.setSelectionRange(0, 99999); /*For mobile devices*/ /* Copy the text inside the text field */ document.execCommand("copy"); });
Attachments (1)
Change History (4)
#1
@
5 years ago
The code added in the description copies the link(to the clipboard) on clicking the "Copy Link" label highlighted in the attached screenshot.
#2
@
5 years ago
- Keywords needs-patch removed
- Resolution set to duplicate
- Status changed from assigned to closed
- Version 5.3.2 deleted
Duplicate of #48463.
Welcome to WordPress Trac!
Thanks for the report, and this is being tracked already in ticket:48463. We're exploring another approach, if you would like to join the discussion there.
Note: See
TracTickets for help on using
tickets.
WordPress Media upload - copy link