_fnScrollDraw grey area when using sScrollY and bScrollCollapse
_fnScrollDraw grey area when using sScrollY and bScrollCollapse
FloppyKing
Posts: 5Questions: 0Answers: 0
When x-scroll is present and you're just crossing the border between when it should be collapsed or not it expands rather than collapses. I believe the issue lies in the IF statement on line 4217 of jquery.dataTables.js v1.8.2. It leaves room for a grey area in which the table can come out up to a scroll bars width greater than the value set in sScrollY. I applied the below fix to my local version of the file and it remedied the issue, but i was hoping to get this added to the core so that on the next release i don't have to make the same fix.
[code]
if ( o.nTable.offsetHeight < nScrollBody.offsetHeight )
{
nScrollBody.style.height = _fnStringToCss( $(o.nTable).height()+iExtra );
}[/code]
should have a + iExtra in the if statement like below
[code]
if ( o.nTable.offsetHeight + iExtra < nScrollBody.offsetHeight )
{
nScrollBody.style.height = _fnStringToCss( $(o.nTable).height()+iExtra );
}[/code]
.... hope this doesn't make me sound ungrateful, because i LOVE DataTables. It's taken my project from "That's nice" to "WOW!".
[code]
if ( o.nTable.offsetHeight < nScrollBody.offsetHeight )
{
nScrollBody.style.height = _fnStringToCss( $(o.nTable).height()+iExtra );
}[/code]
should have a + iExtra in the if statement like below
[code]
if ( o.nTable.offsetHeight + iExtra < nScrollBody.offsetHeight )
{
nScrollBody.style.height = _fnStringToCss( $(o.nTable).height()+iExtra );
}[/code]
.... hope this doesn't make me sound ungrateful, because i LOVE DataTables. It's taken my project from "That's nice" to "WOW!".
This discussion has been closed.