Scroll y and Tabs with IE8 Bug
Scroll y and Tabs with IE8 Bug
Kode3
Posts: 5Questions: 0Answers: 0
I am having an issue with using Scroll y at the same time as using UI tabs with IE8.
I verified the problem exists with this example:
http://www.datatables.net/examples/api/tabs_and_scrolling.html
Specifically the problem is at line 5191 of the non-minified jquery.dataTables.js. The function affected is:
[code]
function _fnScrollingWidthAdjust ( oSettings, n )
{
if ( oSettings.oScroll.sX === "" && oSettings.oScroll.sY !== "" )
{
/* When y-scrolling only, we want to remove the width of the scroll bar so the table
* + scroll bar will fit into the area avaialble.
*/
var iOrigWidth = $(n).width();
n.style.width = _fnStringToCss( $(n).outerWidth()-oSettings.oScroll.iBarWidth );
}
else if ( oSettings.oScroll.sX !== "" )
{
/* When x-scrolling both ways, fix the table at it's current size, without adjusting */
n.style.width = _fnStringToCss( $(n).outerWidth() );
}
}
[/code]
The error from IE8 is:
[code]
Webpage error details
Message: Invalid argument.
Line: 5191
Char: 5
Code: 0
URI: http://www.datatables.net/release-datatables/media/js/jquery.dataTables.js
[/code]
I hope this is enough information to trace this out. I know that it works fine on FF 3.6.8 and the latest Chrome.
I verified the problem exists with this example:
http://www.datatables.net/examples/api/tabs_and_scrolling.html
Specifically the problem is at line 5191 of the non-minified jquery.dataTables.js. The function affected is:
[code]
function _fnScrollingWidthAdjust ( oSettings, n )
{
if ( oSettings.oScroll.sX === "" && oSettings.oScroll.sY !== "" )
{
/* When y-scrolling only, we want to remove the width of the scroll bar so the table
* + scroll bar will fit into the area avaialble.
*/
var iOrigWidth = $(n).width();
n.style.width = _fnStringToCss( $(n).outerWidth()-oSettings.oScroll.iBarWidth );
}
else if ( oSettings.oScroll.sX !== "" )
{
/* When x-scrolling both ways, fix the table at it's current size, without adjusting */
n.style.width = _fnStringToCss( $(n).outerWidth() );
}
}
[/code]
The error from IE8 is:
[code]
Webpage error details
Message: Invalid argument.
Line: 5191
Char: 5
Code: 0
URI: http://www.datatables.net/release-datatables/media/js/jquery.dataTables.js
[/code]
I hope this is enough information to trace this out. I know that it works fine on FF 3.6.8 and the latest Chrome.
This discussion has been closed.
Replies
[code]
if ( typeof s == 'number' )
{
if ( s < 0 )
{
return "0px";
}
return s+"px";
}
[/code]
Regards,
Allan