ColVis.js
ColVis.js
[code]
if ( iDivX + iDivWidth > iDocWidth )
{
nHidden.style.left = (iDocWidth-iDivWidth)+"px";
}
// This if-statement does not seem to be functioning right
if ( iDivY + iDivHeight > iDocHeight )
{
nHidden.style.top = (iDivY-iDivHeight-$(this.dom.button).outerHeight())+"px";
}
[/code]
I'm really no JavaScript expert, but this if-statement, at least for me, is not loading right. It causes the pop-up to run off the top of the screen, but behaves like it should once you click out and then click the button again. It seems as though iDivY, iDivHeight or iDocHeight are not displaying correctly on the original load, but I haven't sat down to debug it, but rather just commented out the function completely to get it working correctly.
I'm using FF 4 on Linux and the beta release of DataTables.
if ( iDivX + iDivWidth > iDocWidth )
{
nHidden.style.left = (iDocWidth-iDivWidth)+"px";
}
// This if-statement does not seem to be functioning right
if ( iDivY + iDivHeight > iDocHeight )
{
nHidden.style.top = (iDivY-iDivHeight-$(this.dom.button).outerHeight())+"px";
}
[/code]
I'm really no JavaScript expert, but this if-statement, at least for me, is not loading right. It causes the pop-up to run off the top of the screen, but behaves like it should once you click out and then click the button again. It seems as though iDivY, iDivHeight or iDocHeight are not displaying correctly on the original load, but I haven't sat down to debug it, but rather just commented out the function completely to get it working correctly.
I'm using FF 4 on Linux and the beta release of DataTables.
This discussion has been closed.
Replies
Allan
I can confirm that I have seen this misbehaviour last week in DataTables 1.7.6, too, but it doesn't appear anymore right now. Maybe it appears only with a high amount of columns to be displayed/hidden? (I had more than 30 buttons in the Collection menu, but display only 10 buttons now).
Regarding this, there seems to be a similar problem with the Option "sAlign": "right", too. On the first display of the Collection list, in FF4 on Mac the list is always left-bound, not right-bound. After the second display it works as expected, though. In IE8 (and IE7 compatibility mode) the display is always as configured (right-bound).
Regards,
fha