jqgrid-双击一行在IE8中选择该行 [英] jqgrid - double clicking a row selects the row in IE8

查看:125
本文介绍了jqgrid-双击一行在IE8中选择该行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我双击一行时,它选择的是IE8中的行,而不是FF和Chrome中的行.这是IE8中的问题,还是有任何错误?谢谢...

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...

推荐答案

该行为是众所周知的.例如,您可以在 jQuery.dblclick 的文档中阅读以下内容:

The behavior is well-know. For example you can read the following in the documentation of the jQuery.dblclick:

触发的事件顺序因浏览器而异, 一些在dblclick之前收到两个click事件,而另一些仅 一.双击敏感度(两次点击之间的最长间隔为 检测为双击)可能会因操作系统和浏览器而异, 并且通常是用户可配置的.

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);
    }
}

请参见另一个演示.

这篇关于jqgrid-双击一行在IE8中选择该行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆