1

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

varaprakash
  • 487
  • 4
  • 12
  • 30
  • Which behavior you would like? Try the same in [the demo](http://www.ok-soft-gmbh.com/jqGrid/SimpleLocalGridWithColumnChooser5.htm) for example. Can you reproduce the "double click" in the demo? – Oleg Jan 24 '12 at 17:14
  • Hi Oleg, I have the multiselect: true option, the demo has no check boxes. When I have that option, double clicking a row, selects(highlights) the row. As I mentioned, it is not the same in FF and chrome... – varaprakash Jan 24 '12 at 19:44
  • I have added multiselect: true in your demo code and tested it locally, it has the same issue that I reported. Thanks... – varaprakash Jan 24 '12 at 19:47
  • Regarding behavior, I do not want the row to be selected automatically when I double click on it. – varaprakash Jan 24 '12 at 20:10

1 Answers1

3

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.

Oleg
  • 220,925
  • 34
  • 403
  • 798