Browse files

Fix: remove tabindex from clone header nodes

- Tabbing through a scrolling table the tabindex on the cloned header in
  the body part of hte table meant that the browser would focus on those
  elements. Fix is to remove the tab index from the clone nodes.
  • Loading branch information...
1 parent e00037a commit 079a1f2e1d88973810822e0bb03f650ba7dc81d9 @DataTables committed Mar 1, 2013
Showing with 2 additions and 0 deletions.
  1. +1 −0 media/js/jquery.dataTables.js
  2. +1 −0 media/src/core/core.scrolling.js
View
1 media/js/jquery.dataTables.js
@@ -3258,6 +3258,7 @@
o.nTable.insertBefore( nTheadSize, o.nTable.childNodes[0] );
anHeadToSize = o.nTHead.getElementsByTagName('tr');
anHeadSizers = nTheadSize.getElementsByTagName('tr');
+ $('th, td', nTheadSize).removeAttr('tabindex');
if ( o.nTFoot !== null )
{
View
1 media/src/core/core.scrolling.js
@@ -214,6 +214,7 @@ function _fnScrollDraw ( o )
o.nTable.insertBefore( nTheadSize, o.nTable.childNodes[0] );
anHeadToSize = o.nTHead.getElementsByTagName('tr');
anHeadSizers = nTheadSize.getElementsByTagName('tr');
+ $('th, td', nTheadSize).removeAttr('tabindex');
if ( o.nTFoot !== null )
{

0 comments on commit 079a1f2

Please sign in to comment.