bScrollOversize wrongly calculated for Firefox

bScrollOversize wrongly calculated for Firefox

randomuserrandomuser Posts: 6Questions: 0Answers: 0
edited August 2012 in Bug reports
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.

Replies

  • allanallan Posts: 61,920Questions: 1Answers: 10,152 Site admin
    Thanks very much for flagging this up and pointing out the fix. I shall put this into the code and investigate a little bit further later on today.

    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
  • allanallan Posts: 61,920Questions: 1Answers: 10,152 Site admin
    You suggested change has now been committed. Thanks for both flagging this up and suggesting the fix! :-).

    The 1.9.4.dev nightly has this change and is available on the downloads page: http://datatables.net/download/ .

    Regards,
    Allan
This discussion has been closed.