1

Enter does not select item in select element in inline edit and blocks double click.

Steps to reproduce:

Open http://trirand.com/blog/jqgrid/jqgrid.html

in IE9

Select

Row Editing (new) Input types

Double click in first row "Desktop computer" to start inline edit

Click in "Ship via" column in first row FedEx fiel to open dropdown.

Press Down arrow key to select Intime

Press Enter

Observed:

  1. FedEx appears in Ship Via column

  2. Double click in this row not more starts inline edit

Expected:

  1. Intime should appear

  2. Double click should put row in inline edit mode again.

How to fix ?

Andrus
  • 26,339
  • 60
  • 204
  • 378

1 Answers1

1

I suggest to solve the problem like in the change. The idea is very easy. Is one change focus many required finalization actions can be done in the current control. For example in case of <select> the 'change' event will be fired, onfocusout will be called and popup menus (context menu or datepicker) will be closed and so on.

SO I suggest to add the line

$(ta).closest("tr.jqgrow").focus();

inside of 'keydown' event handler after the line. The results you can see on the demo.

Oleg
  • 220,925
  • 34
  • 403
  • 798
  • line referenced in answer https://github.com/tonytomov/jqGrid/blob/v4.3.2/js/grid.inlinedit.js#L100 in in Esc key processing branch. Is this right line? – Andrus Apr 23 '12 at 07:39
  • @Andrus: One should add the line before `saveRow`. The problem is that the editor of github.com skip sometime in Chrome from the ennumeration of the lines if the first lines of the the JS which contains comments. So the links can be wrong. I fixed the link using Firefox. – Oleg Apr 23 '12 at 07:46