From 56763b7cbb5475a80ef8919cd229d0d20844b9ff Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Tue, 16 Oct 2012 15:26:03 -0400 Subject: [PATCH] Add validation for the focus in hidden fields in the grid --- gulliver/js/grid/core/grid.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gulliver/js/grid/core/grid.js b/gulliver/js/grid/core/grid.js index c1d8a1341..412ca90fd 100755 --- a/gulliver/js/grid/core/grid.js +++ b/gulliver/js/grid/core/grid.js @@ -685,8 +685,8 @@ var G_Grid = function(oForm, sGridName){ //Set focus the first element in the grid for (var i = 0; i < this.aFields.length; i++) { var fieldName = 'form[' + sGridName + '][' + currentRow + '][' + this.aFields[i].sFieldName + ']'; - if (this.aFields[i].sType != 'file' && document.getElementById(fieldName).focus) { - document.getElementById(fieldName).focus(); + if (this.aFields[i].sType != 'file' && this.aFields[i].sType != 'hidden' && document.getElementById(fieldName).focus) { + document.getElementById(fieldName).focus();console.log(fieldName); break; } }