ItemClick prevent user from selecting text in a grid row


On Vaadin 7.5.5,
ItemClick prevent user from selecting text in a grid row.

It works fine with a table.



I’m surprised,
Nobody is interested to select text in a grid?
Or maybe it’s a better idea to use a Table instead of ?

May I have an answer?

Actually it does not prevent user selecting the text. However in some cases the selection color setting do reset, so that you do not see the selection. If you do copy paste you will notice that it works.

Thanks for the answer Tatu Lund.

But, It’s not just a a color problem, It’s a bug.
I thought the issue was linked with ItemClick but I’m not sure now.

You may try test a copy paste in the Vaadin sampler :

The behavior is very strange.
On IE, if you select a part of a cell, the full cell is copied.
On FF, you cannot copy a cell but if you select a couple of cells, it works.


I can confirm this. On FF ESR 38.5 copy-pasting a single cell from a grid does not work. Chrome and IE do not have this issue. Funny thing is that when you select multiple rows to copy-paste then it works.


Maybe you could check with versión 7.6.3.
The vaadin team solved several grid issues in this version in this latest version.
One of them is being able to select a row after deleting last row in the grid.


Hi Francisco,

Please try to select text with FF in Vaadin demo site :


Sorry @Arnaud,
Why should I need that? Is the sampler or this example using 7.6.3?
I tested it with FF 26 and I’m able to select text from a cell?



The sampler doesn’t use Vaadin 7.6.3 (7.6.0rc). It’s a wrong example, I delete it in my previous post.

I only keep the first link which is running with the last Vaadin version.
I’ve updated my FF (version 44) and the bug is here.


Tried this in the sampler, does not work either :

Thanks Jorg,

The issue has been exposed 4 months ago (see my first post on it). I cannot do more.
Please, Is there Vaadin member available to create a bug on it ?



Yes, indeed it seems to work oddly with Firefox. I noticed today, that if you paint text with a mouse and press control+c before releasing the mouse button, the copying works. However if you release mouse button first and press control+c after that, it does not work.

Br. Tatu

Seems that there is some forced focus handling that might mess up text selections. I need to investigate this further and test a bit on the possible fixes to this. Focus handling in Grid is a bit complex and not too straightforward.


Thanks Teemu.
Strange but That’s works fine on Chrome.


I tried but the test failed with Vaadin 7.6.5 and FireFox 45.0.2.
I think the bug #19653 should be re-opened.


There is still a lingering problem where you try to move the focus and select text at the same time, because this triggers a re-render of the escalator cell which leads to text not being selected anymore. if you first click on the cell you want to select text from and then start selecting after the outline is there, it should work fine.

The focus should be moved on mouse down instead of mouse up, but that would also change quite a few other event handling related things. This would eliminate the need to pre-focus the cell you want to select text from.

That doesn’t work for me in FF 47. Even if it did, it still would be awkward. Not releasing the mouse button works, but that’s user-hostile, too.

Same Problem. The ticket #19653 should be re-opened

We have the same problem on Grid with Vaadin 7.7.6 in Firefox 50.1.0.