News for hackers. Stuff that matters.
Re:How does Trello access the user's clipboard? by eksith on Saturday August 03, 2013 @04:56PM (#6153371)
Afraid not.

My suggestion, expanding on what they do, is to not to try to copy anything to the user's clipboard and instead highlight the content (I'd advise against the hidden textarea too though). On mobile devices especially, highlighting is still a bit of a pain with large amounts of text.

http://stackoverflow.com/questions/11128130/select-text-in-j...

Leave copying to the user. As an added benefit, you're not relying on browser hacks (IE only or otherwise) or flash.

Re:How does Trello access the user's clipboard? by arsenerei on Saturday August 03, 2013 @05:26PM (#6153469)
I'm curious why you'd advise against the hidden textarea.
Re:How does Trello access the user's clipboard? by eksith on Saturday August 03, 2013 @05:34PM (#6153498)
This is entirely subjective so feel free to disregard. I don't believe it's necessarily a good idea to introduce elements that aren't user accessible.

In this case, it's an actionable (command only) element that's inaccessible directly; the same as a tooltip or popup that hasn't shown itself yet. However, even in the case of a tooltip or popup, they will eventually show themselves to the user. A completely hidden anything IMO introduces a layer of obfuscation to what's actually happening to the DOM and on the page.

It's a bit "hackish".

Re:How does Trello access the user's clipboard? by arsenerei on Saturday August 03, 2013 @05:42PM (#6153525)
I'm not sure if you mean user accessible in terms of User Accessibility or just a typical user having access. I think we're talking about UA, it wouldn't apply in this case, because they would be using a screen reader and using its features to find and copy the URI (rather than by hovering). In the case of a typical user, I think it does what they want, so it doesn't go against desire and ultimately enhances UX.

It's definitely hackish, though. :)