When I double click a row it is selecting the row in IE8 but not in FF and Chrome. Is it an issue in IE8 or is there any bug for this? Thanks...
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The behavior is well-know. For example you can read the following in the documentation of the jQuery.dblclick:
The sequence of events triggered varies from browser to browser, with some receiving two click events before the dblclick and others only one. Double-click sensitivity (maximum time between clicks that is detected as a double click) can vary by operating system and browser, and is often user-configurable.
If you want common behavior in all browsers you code do the following:
ondblClickRow: function (rowid) {
if ($.browser.msie && parseInt($.browser.version, 10) < 9) {
$(this).jqGrid('setSelection', rowid, false);
}
}
see the demo or the opposite behavior with the code
ondblClickRow: function (rowid) {
if (!$.browser.msie || parseInt($.browser.version, 10) > 8) {
$(this).jqGrid('setSelection', rowid, false);
}
}
see another demo.