Skip to content

Commit

Permalink
Fix settimeout to have dalay on some calls in celledit
Browse files Browse the repository at this point in the history
  • Loading branch information
tonytomov committed Mar 19, 2014
1 parent a0b82ac commit 90ba405
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/grid.celledit.js
Expand Up @@ -50,7 +50,7 @@ $.jgrid.extend({
// save the cell
$($t).jqGrid("saveCell",$t.p.savedRow[0].id,$t.p.savedRow[0].ic);
} else {
window.setTimeout(function () { $("#"+$.jgrid.jqID($t.p.knv)).attr("tabindex","-1").focus();},0);
window.setTimeout(function () { $("#"+$.jgrid.jqID($t.p.knv)).attr("tabindex","-1").focus();},1);
}
cm = $t.p.colModel[iCol];
nm = cm.name;
Expand Down Expand Up @@ -84,7 +84,7 @@ $.jgrid.extend({
var elc = $.jgrid.createEl.call($t,cm.edittype,opt,tmp,true,$.extend({},$.jgrid.ajaxOptions,$t.p.ajaxSelectOptions || {}));
$(cc).html("").append(elc).attr("tabindex","0");
$.jgrid.bindEv.call($t, elc, opt);
window.setTimeout(function () { $(elc).focus();},0);
window.setTimeout(function () { $(elc).focus();},1);
$("input, select, textarea",cc).bind("keydown",function(e) {
if (e.keyCode === 27) {
if($("input.hasDatepicker",cc).length >0) {
Expand Down

0 comments on commit 90ba405

Please sign in to comment.