PDA

View Full Version : EditorGrid clicksToEdit:1 and edited cells



steven
1 Jul 2007, 3:32 PM
If I set clicksToEdit to 1 in an EditorGrid then I can single click into a cell and begin editing immediately.

If I click into another cell without changing the value the cell displays the editor for the new cell.

If I change the value of the first cell however and then click into another cell the editor doesn't appear.

I have traced through part of the extjs code and I can see that it does actually display the editor for the new cell but an onBlur event causes the editor to close.

I have tested on Firefox 2.0.

You can reproduce using the edit-grid demo by adding clicksToEdit:1 into the grid.

I have tested using both ext 1.01a and 1.1 beta 2. They both give the same results.


Is there a workaround or fix I can apply to get this to work?

steven
3 Jul 2007, 4:09 PM
Any info on this?

jack.slocum
3 Jul 2007, 6:29 PM
I spent some time on this and currently, I can't think of a work around. The problem is, when you mousedown on the cell, the field blurs which triggers an edit complete, which triggers a refresh of the row. Since the row you moused down on no longer exists, the click never happens. This only happens while clicking within the same row you previously edited.

I will continue to look at it and try to find a workaround, but it's not something that is going to be easy.

steven
4 Jul 2007, 6:33 PM
I spent some time on this and currently, I can't think of a work around. The problem is, when you mousedown on the cell, the field blurs which triggers an edit complete, which triggers a refresh of the row. Since the row you moused down on no longer exists, the click never happens. This only happens while clicking within the same row you previously edited.

I will continue to look at it and try to find a workaround, but it's not something that is going to be easy.

Thanks for that. I'll see if I can create a workaround for now.