mirror of
https://github.com/DataTables/DataTables.git
synced 2026-04-25 03:00:08 -04:00
Fix: IE6/7 return an empty string for getAttribute('id') when there is no ID attribute, rather than null. As such tables were not automatically being given an ID when they didn't have one, which created a situation where the settings object for a table could be 'lost' in IE6/7. Now check for empty string when checking the table ID.
This commit is contained in:
2
media/js/jquery.dataTables.js
vendored
2
media/js/jquery.dataTables.js
vendored
@@ -6178,7 +6178,7 @@
|
||||
}
|
||||
|
||||
/* Ensure the table has an ID - required for accessibility */
|
||||
if ( sId === null )
|
||||
if ( sId === null || sId === "" )
|
||||
{
|
||||
sId = "DataTables_Table_"+(DataTable.ext._oExternConfig.iNextUnique++);
|
||||
this.id = sId;
|
||||
|
||||
@@ -50,7 +50,7 @@ for ( i=0, iLen=DataTable.settings.length ; i<iLen ; i++ )
|
||||
}
|
||||
|
||||
/* Ensure the table has an ID - required for accessibility */
|
||||
if ( sId === null )
|
||||
if ( sId === null || sId === "" )
|
||||
{
|
||||
sId = "DataTables_Table_"+(DataTable.ext._oExternConfig.iNextUnique++);
|
||||
this.id = sId;
|
||||
|
||||
Reference in New Issue
Block a user