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:
parent
04d4786455
commit
cd0babca54
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user