KeyTable input withing header is not tabbable
KeyTable input withing header is not tabbable

Hi, when KeyTable extension is used then it is impossible to tab with the keyboard into an input within a heading column.
Just try following:
1. go to http://live.datatables.net/sadupisu/1/
2. click on search
3. use tab key to enter input withing first column heading
Instead focusing the input the first cell within the body receives focus.
This discussion has been closed.
Answers
Hmmm - interesting one, that I don't actually know how to address immediately. You can disable the KeyTable focus which allows it to work but then there is no way to tab focus the table cells.
The way the tab focus for the table works is that KeyTable injects a hidden input element just before the table. When you tab through and that gains focus, it moves the focus to the first cell in the table.
Because of that the cells gain focus before the header.
The only thing I can think of is that we put the hidden input after the table in the document, but that will mess around with any input elements in the footer in a similar manner.
I need to think about this one a bit. Any thoughts welcome as well!
Allan
Hi, I don't know if it would be possible to just handle it with events on the table directly? But if it is handled by a hidden input then it would be useful to set a configuration if it should be before, after or nowhere?
I suppose one option would be for KeyTable to insert the hidden element into the first visible cell in the table and then update that on every
draw
andcolumn-visibility
event. It means it needs to do a bit more work, but it would work with header and footer elements.Let me experiment with that a little.
Allan
Just been working on this to wrap it up for the next round of releases, and I have indeed gone with that approach. Commit is here and it will be in KeyTable 2.5.2.
Regards,
Allan