PDA

View Full Version : Button handler fired before grid item lost focus



innek81
15 Mar 2010, 2:48 AM
Hi guys,

Scenario:
1. User has completed modifying text in an editor grid and the focus is still in the grid cell.
2. User clicks the "Process" button, which has a handler (http://www.extjs.com/deploy/dev/docs/source/Button.html#cfg-Ext.Button-handler) function that get the modified records of the editor grid and processes them.

Problem is the focus of the grid cell after the edit was lost much later after the button's handler event was invoked. Therefore the modification was not reflected during the button's handler event.

I tried explicitly setting the focus to the button, when the handler is invoked, but to no avail.

Setting the focus to the button on "mouseover" works, as the cell becomes dirty, works but not too clean a solution.