Andrus
Andrus

Reputation: 27931

how to select item using Enter and enable double click in jqgrid in inline edit

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 ?

Upvotes: 1

Views: 1286

Answers (1)

Oleg
Oleg

Reputation: 221997

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.

Upvotes: 1

Related Questions