1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-11-30 12:24:10 +01:00

Fix: When applying the sanity width for y-scrolling only we need to know if the scrolling element has scroll bars visible or not. Previously we checked if the element was bigger than the visible area, but this isn't good enough of overflow:scroll is set. Need to check that parameter as well - 5658

This commit is contained in:
Allan Jardine 2011-07-08 17:27:35 +01:00
parent b61466cca4
commit 61f05f8da7

View File

@ -4050,8 +4050,9 @@
/* If x-scrolling is disabled, then the viewport cannot be less than the sanity width */
if ( o.oScroll.sX === "" )
{
var iCorrection = (nScrollBody.scrollHeight > nScrollBody.offsetHeight) ?
iSanityWidth+o.oScroll.iBarWidth : iSanityWidth;
var iCorrection = (nScrollBody.scrollHeight > nScrollBody.offsetHeight ||
$(nScrollBody).css('overflow-y') == "scroll") ?
iSanityWidth+o.oScroll.iBarWidth : iSanityWidth;
nScrollBody.style.width = _fnStringToCss( iCorrection );
nScrollHeadInner.parentNode.style.width = _fnStringToCss( iCorrection );