1

我使用jqGrid 4.13.0,它似乎导致使用IE8时出错。错误在jquery.fmatter模块中进行了本地化。jqGrid 4.13.0错误与IE8 Object.create

YesObjectNoObject使用Object.create它不是IE8兼容。任何想法的解决方法?非常感谢。

var fmatter = $.fmatter, 
    getOptionByName = function (colModel, name) { 
     ... 
    }, 
    parseCheckboxOptions = function (options) { 
     ... 
    }, 
    YesObject = Object.create(null, { 
     1: { value: 1 }, 
     x: { value: 1 }, 
     "true": { value: 1 }, 
     yes: { value: 1 }, 
     on: { value: 1 } 
    }), 
    NoObject = Object.create(null, { 
     0: { value: 1 }, 
     "false": { value: 1 }, 
     no: { value: 1 }, 
     off: { value: 1 } 
    }); 
+0

你是否需要支持ie8?有没有很多网格功能支持ie8了... – erichardson30

+0

我确实想支持IE8,但我没有任何计算机与IE8进行测试。我会将修复发布到GitHub上,并会要求您进行测试。 – Oleg

回答

1

非常感谢您的错误报告!我有技术问题来测试IE8上的免费jqGrid,但我不想放弃支持它,直到它真的需要。

Object.create奇怪用法的原因是the test,它显示了如何更好地测试数组中元素的存在。在我所有的现代网络浏览器测试中,使用Object.create的方式更好,我最初选择它。

我承诺the bug fix GitHub。请从the repository获取最新信息。

+0

在IE 8上测试确定 – jfprevot

+0

@jfprevot:您没有[“接受”](http://meta.stackexchange.com/a/5235/147495)答案。你想做一些额外的测试吗? – Oleg

+0

对不起,我忘了“接受”。做得好 ! – jfprevot