bScrollOversize wrongly calculated for Firefox
bScrollOversize wrongly calculated for Firefox
randomuser
Posts: 6Questions: 0Answers: 0
Hello there,
As seen on http://datatables.net/examples/basic_init/scroll_y.html
the bScrollOversize calculation (and therefore the IE detection) is wrongly done in Firefox 14.
As a result, you see a small gap between the last column and the vertical scroll bar, mostly as wide as the scrollbar itself.
This is caused by a browser detection test in _fnBrowserDetect(), in which Firefox does indeed show the given div with 100px width, but not due to the reason that is actually looked for (IE shows a vertical scroller AND expands the div).
The solution for this is to simply remove the #DT_BrowserTest parent's height. Then Firefox renders the scroll bar and as a result, calculates #DT_BrowserTest down to 100px MINUS the displayed scroll bar.
Previous:
[code][/code]
After:
[code][/code]
That should fix it. Didn't test in IE as I don't have it installed, but logically it should continue it's behaviour and the test should perform correct.
As seen on http://datatables.net/examples/basic_init/scroll_y.html
the bScrollOversize calculation (and therefore the IE detection) is wrongly done in Firefox 14.
As a result, you see a small gap between the last column and the vertical scroll bar, mostly as wide as the scrollbar itself.
This is caused by a browser detection test in _fnBrowserDetect(), in which Firefox does indeed show the given div with 100px width, but not due to the reason that is actually looked for (IE shows a vertical scroller AND expands the div).
The solution for this is to simply remove the #DT_BrowserTest parent's height. Then Firefox renders the scroll bar and as a result, calculates #DT_BrowserTest down to 100px MINUS the displayed scroll bar.
Previous:
[code][/code]
After:
[code][/code]
That should fix it. Didn't test in IE as I don't have it installed, but logically it should continue it's behaviour and the test should perform correct.
This discussion has been closed.
Replies
Interestingly it appears that the problem only occurs in Windows; Firefox Mac does not show the same problem (which is how I missed it - stupidly assumed that Firefox would render the same on the two platforms...).
I'll post back when the change is committed to DataTables and the nightly is up-to-date.
Allan
The 1.9.4.dev nightly has this change and is available on the downloads page: http://datatables.net/download/ .
Regards,
Allan