Re:Clipboard.js: Modern Copy to Clipboard
by stephenr on Wednesday September 30, 2015 @04:03PM
(#10306704)
Or people could .. You know... Use their platforms existing copy functionality.
I know it's only existed on desktop computers since the Apple Lisa, and 30 years isn't very long for people to grasp the concept of copy and paste without a button to do it, but I have faith in people.
Re:Clipboard.js: Modern Copy to Clipboard
by henvic on Wednesday September 30, 2015 @06:13PM
(#10307776)
This button couldn't be customized, otherwise it's useless as someone could easily get away with hiding it / showing only a small portion of it where someone could click without even noticing / etc.
Maybe a small modal-like confirmation that can be placed anywhere on the viewport and is actually on top of everything natively (like Safari's copy/paste on iOS).
Of course, this modal-like confirmation must not be customized or its effect is useless.
Or let's just forget entirely and remove the functionality from the browsers.
A trivial compromise that would be even easier to use than the current javascript/selection stuff would be a "copy to clipboard" variant of the <button> tag. Something like this should satisfy the use-cases where this clipboard nonsense is occasionally useful:
This wouldn't require any Javascript, and leaves the clipboard entirely under the control of the user where it belongs.This could even be extended to allow copying of the various types of input tags, and if you wanted to get fancy, the button could reference an #id and copy that element's textContent (or innerHTML).