Making sure focus is set properly when tabbing through fields in the datatable editor
This commit is contained in:
parent
a5bdf1d5ab
commit
7e51ddd3b2
1 changed files with 4 additions and 3 deletions
|
|
@ -132,8 +132,10 @@ WebGUI.Form.DataTable
|
||||||
*/
|
*/
|
||||||
this.handleEditorShowEvent
|
this.handleEditorShowEvent
|
||||||
= function ( obj ) {
|
= function ( obj ) {
|
||||||
obj.editor.focus();
|
/* If we set the focus now, something might (and sometimes does) set
|
||||||
setTimeout( obj.editor.focus, 500 );
|
* it later in the event handling chain. Let's defer the focus set
|
||||||
|
* until this chain is finished. */
|
||||||
|
setTimeout(function() { obj.editor.focus() }, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
|
@ -144,7 +146,6 @@ WebGUI.Form.DataTable
|
||||||
= function () {
|
= function () {
|
||||||
var row = this.dataTable.getLastTrEl();
|
var row = this.dataTable.getLastTrEl();
|
||||||
this.dataTable.showCellEditor( row.firstChild );
|
this.dataTable.showCellEditor( row.firstChild );
|
||||||
this.dataTable.getCellEditor().focus();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue