Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Looking to copy-and-paste cell description
I am hoping to copy all or part of a (Grid) cell description (aka tooltip) to the clipboard. Is it possible?
Vaadin 7.6.8
Hi,
it might be doable with some JavaScript hackery, but I wouldn't count on it to work reliably on all platforms - I think more security-conscious browsers might block that. There's an add-on called JsClipboard that does something like that - it might not do exactly what you need, but you should be able to pick out the relevant JavaScript bit from the sources.
-Olli
For automatic clipboard interaction, Olli's suggestion is the way to go; example - clicking a button to put the text in the clipboard. If you don't mind manually selecting the text and hitting your system's copy key combo (ctrl-c, etc..), the following CSS worked for me (default setting was "user-select: none;" inherited from div.v-tooltip):
.v-tooltip .v-tooltip-text {
user-select: auto;
}