Merge pull request #757 from julceslauhub/master

Add validation for the focus in hidden fields in the grid
This commit is contained in:
julceslauhub
2012-10-16 12:28:19 -07:00

View File

@@ -685,8 +685,8 @@ var G_Grid = function(oForm, sGridName){
//Set focus the first element in the grid //Set focus the first element in the grid
for (var i = 0; i < this.aFields.length; i++) { for (var i = 0; i < this.aFields.length; i++) {
var fieldName = 'form[' + sGridName + '][' + currentRow + '][' + this.aFields[i].sFieldName + ']'; var fieldName = 'form[' + sGridName + '][' + currentRow + '][' + this.aFields[i].sFieldName + ']';
if (this.aFields[i].sType != 'file' && document.getElementById(fieldName).focus) { if (this.aFields[i].sType != 'file' && this.aFields[i].sType != 'hidden' && document.getElementById(fieldName).focus) {
document.getElementById(fieldName).focus(); document.getElementById(fieldName).focus();console.log(fieldName);
break; break;
} }
} }