1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-30 23:52:11 +01:00

Fix: Firefox Windows (not Mac) had an error when calculating if scrolling oversizing was needed or not (_fnBrowserDetect). The result was that the table did not fill the space when y-scrolling was enabled and Firefox Windows was used. Fix is to remove the height on the DT_BrowserTest parent as suggested by randomuser - 11406

This commit is contained in:
Allan Jardine 2012-08-22 16:39:36 +01:00
parent 93774f4d7d
commit 34096537c2
2 changed files with 16 additions and 11 deletions

View File

@ -433,7 +433,6 @@
}
/**
* Add a data array to the table, creating DOM node etc. This is the parallel to
* _fnGatherData, but for adding rows from a Javascript source, rather than a
@ -498,7 +497,7 @@
/* Add to the display array */
oSettings.aiDisplayMaster.push( iRow );
/* Create the DOM imformation */
/* Create the DOM information */
if ( !oSettings.oFeatures.bDeferRender )
{
_fnCreateTr( oSettings, iRow );
@ -4881,7 +4880,7 @@
*/
var n = $(
'<div style="position:absolute; top:0; left:0; height:1px; width:1px; overflow:hidden">'+
'<div style="position:absolute; top:1px; left:1px; width:100px; height:50px; overflow:scroll;">'+
'<div style="position:absolute; top:1px; left:1px; width:100px; overflow:scroll;">'+
'<div id="DT_BrowserTest" style="width:100%; height:10px;"></div>'+
'</div>'+
'</div>')[0];
@ -5368,7 +5367,7 @@
var nBody = oSettings.nTBody;
var i, iLen;
bRemove = (bRemove===undefined) ? false : true;
bRemove = (bRemove===undefined) ? false : bRemove;
/* Flag to note that the table is currently being destroyed - no action should be taken */
oSettings.bDestroying = true;
@ -5376,7 +5375,9 @@
/* Fire off the destroy callbacks for plug-ins etc */
_fnCallbackFire( oSettings, "aoDestroyCallback", "destroy", [oSettings] );
/* Restore hidden columns */
/* If the table is not being removed, restore the hidden columns */
if ( !bRemove )
{
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
{
if ( oSettings.aoColumns[i].bVisible === false )
@ -5384,6 +5385,7 @@
this.fnSetColumnVis( i, true );
}
}
}
/* Blitz all DT events */
$(oSettings.nTableWrapper).find('*').andSelf().unbind('.DT');
@ -5475,6 +5477,7 @@
/* End it all */
oSettings = null;
oInit = null;
};
@ -6298,7 +6301,7 @@
var _that = this;
return this.each(function() {
this.each(function() {
var i=0, iLen, j, jLen, k, kLen;
var sId = this.getAttribute( 'id' );
@ -6742,6 +6745,8 @@
_fnInitialise( oSettings );
}
} );
_that = null;
return this;
};

View File

@ -333,7 +333,7 @@ function _fnBrowserDetect( oSettings )
*/
var n = $(
'<div style="position:absolute; top:0; left:0; height:1px; width:1px; overflow:hidden">'+
'<div style="position:absolute; top:1px; left:1px; width:100px; height:50px; overflow:scroll;">'+
'<div style="position:absolute; top:1px; left:1px; width:100px; overflow:scroll;">'+
'<div id="DT_BrowserTest" style="width:100%; height:10px;"></div>'+
'</div>'+
'</div>')[0];