How does Trello access the user’s clipboard?

When you hover over a card in Trello and press Ctrl+C, the URL of this card is copied to the clipboard. How do they do this?

As far as I can tell, there is no Flash movie involved. I’ve got Flashblock installed, and the Firefox network tab shows no Flash movie loaded. (That’s the usual method, for example, by ZeroClipboard.)

How do they achieve this magic?

(Right at this moment I think I had an epiphany: You cannot select text on the page, so I assume they have an invisible element, where they create a text selection via JavaScript code, and Ctrl+C triggers the browser’s default behaviour, copying that invisible node’s text value.)

5 s
5

Leave a Comment