Permalink
Browse files

"Final" fix for Chrome cell width problem.

  • Loading branch information...
1 parent 3988795 commit 46a14ce93fe1b91f199e4fdc560fa26c17ee9bb4 @tonytomov committed May 18, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 js/grid.base.js
View
@@ -182,10 +182,12 @@ $.extend($.jgrid,{
}
},
cellWidth : function () {
- var testcell = $('body').append("<div class='ui-jqgrid' id='jq_testcell' style='left:10000px'><table class='ui-jqgrid-btable' style='width:5px;'><tr class='jqgrow'><td style='width:5px;'></td></tr></table></div>").find("td").width(),
- ret = ( testcell != 5 );
- $("#jq_testcell").remove();
- return ret;
+ var $testDiv = $("<div class='ui-jqgrid' style='left:10000px'><table class='ui-jqgrid-btable' style='width:5px;'><tr class='jqgrow'><td style='width:5px;'></td></tr></table></div>"),
+ testCell = $testDiv.appendTo("body")
+ .find("td")
+ .width();
+ $testDiv.remove();
+ return testCell !== 5;
},
ajaxOptions: {},
from : function(source){

0 comments on commit 46a14ce

Please sign in to comment.