1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-02-18 16:54:14 +01: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:
Allan Jardine 2012-04-02 10:25:52 +01:00
parent 04d4786455
commit cd0babca54
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;