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:
parent
b61466cca4
commit
61f05f8da7
5
media/js/jquery.dataTables.js
vendored
5
media/js/jquery.dataTables.js
vendored
@ -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 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user