Issue with Enter buton
Issue with Enter buton
See this example. https://editor.datatables.net/examples/inline-editing/tabControl.html
When you click on editable cell and it turns into input, now click enter. It will save it ok. But if you now click on the cell again it will not turn into input, until you click somewhere else first. is there a fix for that. Thanks
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi,
Thank you for pointing this out. The issue is related to the fact that cell has focus from the key table already. Let me look into this and get back to you.
Regards,
Allan
Yes, the issue was related to the focus. The edit that had been edited still had focus in KeyTable (not visibly in that example, but in Javascript). As such, when clicking on the cell again there was no
key-focus
event being triggered (it isn't needed) and thus the inline editing wasn't being activated.The fix is to use the following:
i.e. activate the inline editing on click, and also on
key-focus
. Although the initial click will result in both being executed, Editor will simply ignore the second one since the field is already in inline editing state.I'll redeploy the site with this update shortly.
Regards,
Allan
This works great.
Do you think you will be merging that into key plugin at some point?
Thanks Allan
It probably won't be merged directly into KeyTable since I would say that KeyTable is operating as expected at the moment. The cell has focus already so it should have
key-focus
triggered on it again. This is simply down to the way the API is being used.Allan