KeyTable / Tabindex - no focus unless clicking in
KeyTable / Tabindex - no focus unless clicking in
I have a DataTable using Scroller. When I tab through the page I can tab each header for sorting, but then after tabbing through the last header the first cell of the first row of the body doesn't get focus. Instead focus jumps to any button or form element with that table row. I should be able to go from the last header to the first cell of the first row of the table body like it does in the examples. If I click a row, then it will correctly receive focus and tabbing through the cells or arrowing around works as expected. Why can't I tab into the table body correctly?
This question has an accepted answers - jump to answer
Answers
It seems to work as expected for me here: http://live.datatables.net/tuxufava .
Can you link to a test page showing the issue (as requested in the forum rules).
Thanks,
Allan
It appears that it's caused by hiding a column. When the first column is hidden then the in array check in the _focus fails to match and the focus falls on the button/input element instead. I didn't see anything in the docujmentation about this but maybe I missed something. setting keys: {focus: didn't seem to have any effect either.
http://live.datatables.net/tuxufava/4
Awesome - thanks for the extra details and the test case. I've committed the fix and updated example showing it working as it should now.
Regards,
Allan
Great! That worked.