From 90ba405e0ce6ae2c0abdbe205d25744ba0525468 Mon Sep 17 00:00:00 2001 From: Tony Tomov Date: Wed, 19 Mar 2014 12:37:13 +0200 Subject: [PATCH] Fix settimeout to have dalay on some calls in celledit --- js/grid.celledit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/grid.celledit.js b/js/grid.celledit.js index d7680a66d..cf681481f 100644 --- a/js/grid.celledit.js +++ b/js/grid.celledit.js @@ -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; @@ -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) {