[wp-trac] [WordPress Trac] #54426: Add a "Copy URL to clipboard" row action in Media > Library...similar to the botton on the Edit Media screen

WordPress Trac noreply at wordpress.org
Sat Dec 4 16:40:19 UTC 2021


#54426: Add a "Copy URL to clipboard" row action in Media > Library...similar to
the botton on the Edit Media screen
-------------------------------------+-------------------------------------
 Reporter:  pbiron                   |       Owner:  (none)
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  6.0
Component:  Media                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-screenshots has-     |     Focuses:  ui, accessibility,
  patch needs-testing                |  javascript
-------------------------------------+-------------------------------------

Comment (by pbiron):

 [attachment:"54426.4.diff"] builds on [attachment:"54426.3.patch"] but
 with a UI that is closer to that on the `Edit Media` screen: when the
 `Copy URL to clipboard` row action link is clicked, the string `Copied!`
 is displayed for 3 seconds (w/ in the color green).

 The patch from @alexstine gave me enough info to find the JS that is used
 on the `Edit Media` screen and this patch uses basically the same (the one
 mod is that is clears the focus on the `Copy URL to clipboard` link when
 it hides the `Copied!` text...something that should be probably be done on
 `Edit Media`, but I'll leave that to another ticket).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54426#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list