null Key in keyTable.js not allowing the editOnFocus to work?

null Key in keyTable.js not allowing the editOnFocus to work?

ACGenLLCACGenLLC Posts: 2Questions: 1Answers: 0

Hello, I am implementing editor on a page and while trying to implement the editor and editOnFocus in the keys option, I found that it would not enable the editor when I navigated to a new field like I expected, but only when I pressed 'Enter' afterwards. After opening up the source code version of the file (keyTable.js v2.4.0) I found that in _editor there is a block that does not activate editor on control key presses. Here, key was null (because of enabling editOnFocus) and it will evaluate as 0 when used against a >= or =< comparison. It would hit this block and return out of the function, not starting the editor on the field automatically like I was expecting. I didn't know if this was a bug or intended functionality.

Additionally, it looks like the example https://editor.datatables.net/examples/inline-editing/tabControl.html is not working correctly, when I click a cell to inline edit nothing happens and no keypress seems to trigger anything to happen, either.

Thanks,
Anthony

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    Answer ✓

    I'm afraid the current release of KeyTable has a bug with the editOnFocus option. The fix was committed here.

    KeyTable 2.5 is also in the works with reworks the UX a bit so it will be:

    1. Single click - it focuses and you can start typing to replace the current contents of the cell.
    2. Double click - it focuses and enters into edit mode (like editOnFocus used to do) and places the cursor at the end of the current text.

    Allan

  • ACGenLLCACGenLLC Posts: 2Questions: 1Answers: 0

    Thank you Allan!

This discussion has been closed.