3 ms·
How would you do a click to copy button then?
by TZubiri 2y ago
How would you do a click to copy button then?
- snvzz 2y agoWith explicit authorization for the site or even the specific script to be able to write on your clipboard.
- 63stack 2y agoI'm sorry for the snarky response, but: You don't. If your app needs to do that, you instruct the user to select the text, and press C-c. We should not allow crap like this because they are too dumb to understand these instructions, or because your app is so special it just needs to do this on a click.
- antonvs 2y agoWho's "we"? I'm a software developer and I use click to copy buttons on websites all the time. Sites like GitHub, ChatGpt, and many more all have them, because they're useful. They're not "special", quite the opposite - this is a ubiquitous and useful feature. It certainly could make sense to have a security setting that allows this capability to be controlled, in the same sort of way as allowing sites to access your geographic location. But simply saying "we should not allow" it is unrealistic and, frankly, pretty silly.
- TZubiri 2y agoI'm not against that. Maybe a safe browswer mode (incognito) where this is disabled. Devs can polyfill to a popup that says (pleasue use ctrl c or right click copy.)