3 ms·
> When you say, deny, to me the user must go to their browser settings and set it manually? AFAIK: Safari does not expose a setting for this (but I didn't look
by zetafunction 13y ago
> When you say, deny, to me the user must go to their browser settings and set it manually?
AFAIK:
Safari does not expose a setting for this (but I didn't look).
Chrome uses Chrome app/extension permissions to control this setting.
I'm not sure how Firefox does it.
> If so, what bearing does that have on what we're discussing?
You asked "Is there a way to trigger the copy, cut, and paste events?". You don't need to trigger them in this case since the browser automatically fires them when the user invokes the corresponding edit action.
> As for setting the clipboard data, I have seen no way of setting that through the copy, paste or cut events.
Here is a quick sample that works in everything except IE. I'm too impatient to figure out why it doesn't work in IE but http://msdn.microsoft.com/en-us/library/hh772145(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/hh772145(v=vs.85).as... provides IE-centric documentation.
- arsenerei 13y ago> AFAIK: Safari does not expose a setting for this (but I didn't look). Chrome uses Chrome app/extension permissions to control this setting. I'm not sure how Firefox does it. Okay, so for all intents and purposes it cannot be done programmatically without user assistance. > You asked "Is there a way to trigger the copy, cut, and paste events?". You don't need to trigger them in this case since the browser automatically fires them when the user invokes the corresponding edit action. You're right, I apologize. > Here is a quick sample that works in everything except IE. I'm too impatient to figure out why it doesn't work in IE but http://msdn.microsoft.com/en-us/library/hh772145(v=vs.85).as.. http://msdn.microsoft.com/en-us/library/hh772145(v=vs.85).as.... provides IE-centric documentation. As I mentioned in a previous comment, I've seen nothing that suggest this event allows you to change the contents of what's copied to the clipboard before it happens. From what I can tell this is an notification that it has happened. The link you have provided does not indicate anything to the contrary. I'm not ruling out that what you're saying, but I still haven't seen something that definitively shows it's possible. Looking at all the hacks and alternatives to make it as close to "click-to-copy" a possible strong suggests it's not.
- zetafunction 13y agoOh oops. I left out the link to the sample in my last post: http://jsfiddle.net/BE6bR/1 http://jsfiddle.net/BE6bR/1 Try it out =)
- arsenerei 13y agoI stand corrected! Firefox, Chrome and Safari had no issues with this. I could cmd-c without highlighting and it still copied. I finally found something indicating browser-support for this.[0] I have to think it wasn't supported in earlier versions of certain browsers and that's why Trello decided not to go this route. I'm definitely going to play around with this. This is pretty darn cool, thanks for sticking with me. :) 0: http://www.quirksmode.org/dom/events/cutcopypaste.html http://www.quirksmode.org/dom/events/cutcopypaste.html