jqgrid在chrome中运行良好但在Firefox中工作不正常,在Firefox中我无法编辑行,即使下拉也不起作用,如果我使用tab然后只有它工作正常,这里是我的代码:
var l = $("#variablesGrid");
l.jqGrid({
datatype: "local",
data: e,
colNames: ["Data Type", "Is not Array", "Field Name", "Action"],
colModel: [{
name: "dataType",
index: "dataType",
width: 50,
editable: true,
edittype: "select",
editoptions: {
value: r
},
align: "left"
}, {
name: "isArray",
index: "isArray",
width: 17,
editable: true,
formatter: "checkbox",
edittype: "checkbox",
editoptions: {
value: "true:false"
},
align: "center"
}, {
name: "fieldName",
index: "fieldName",
width: 40,
editable: true,
align: "left",
editrules: {
custom: true,
custom_func: f
}
}, {
name: "act",
index: "act",
width: 10,
sortable: false
}],
rowNum: 1e5,
pager: "#variablesPager",
gridview: true,
rownumbers: true,
sortname: "invdate",
viewrecords: true,
sortorder: "desc",
caption: "Variables",
editurl: "clientArray",
width: 900,
height: 250,
loadComplete: function () {
var e = this;
setTimeout(function () {
updatePagerIcons(e);
enableTooltips(e)
}, 0)
},
gridComplete: function () {
var e = jQuery(o).jqGrid("getDataIDs");
for (var t = 0; t < e.length; t++) {
var r = e[t];
ce = '<div title="" style="float:left;margin-left:5px;" class="ui-pg-div ui-inline-del" id="jDeleteButton_12" onclick="BPMProcessPropertiesModule.deleteGridRow(\'' + r + "','" + n + '\');" onmouseover="jQuery(this).addClass(\'ui-state-hover\');" onmouseout="jQuery(this).removeClass(\'ui-state-hover\');" data-original-title="Delete selected row"><span class="ui-icon ui-fa fa-trash"></span></div>';
jQuery(o).jqGrid("setRowData", e[t], {
act: ce
})
}
},
onSelectRow: function (e) {
if (s === false) {
if (e !== t) {
if(t === undefined){
t = e;
}
var r = jQuery(o).jqGrid("getCell", t, "fieldName");
if (r !== false && r != "undefined") {
if (r.indexOf('name="fieldName"') > 0) {
r = $("#" + t + "_fieldName").val();
n = false;
if (r === "" || r === " " || MDBPMUtils.hasSpaces(r)) {
n = true;
l.jqGrid("saveRow", t);
$("#" + t + "_fieldName").focus();
jQuery("#variablesGrid").jqGrid("setSelection", t)
}
}
}
}
}
if (n === false) {
if (e !== t) {
if (t) {
l.jqGrid("saveRow", t)
}
t = e
}
l.jqGrid("editRow", e, true);
return true
}
}
});