Scrollbar Issues

Scrollbar Issues

TVGTVG Posts: 5Questions: 0Answers: 0
edited August 2011 in General
In IE7, when the rows are filtered to a number that causes bScrollCollapse to kick in, the scrollbar is hidden, but the tbody does not expand to fill in the space the scrollbar was in. It should either do that, or a disabled scrollbar should remain there.

Example: http://tinypic.com/r/2ur1l48/7

In FF5, the initial load places the scrollbar outside the width of the head. Once I filter the data, I can clear the filter and the scrollbar will work properly.

Example: http://tinypic.com/r/2mpa52c/7


Any ideas on why the above issues are happening would be much appreciated.

Replies

  • allanallan Posts: 63,258Questions: 1Answers: 10,421 Site admin
    Could you try this with the DataTables 1.8.2 nightly please? It's available from the download page: http://datatables.net/download

    Allan
  • TVGTVG Posts: 5Questions: 0Answers: 0
    Forgot to mention - this is using the latest nightly.
  • allanallan Posts: 63,258Questions: 1Answers: 10,421 Site admin
    Can you possibly link to your test page please?

    Thanks,
    Allan
  • TVGTVG Posts: 5Questions: 0Answers: 0
    PMd
  • allanallan Posts: 63,258Questions: 1Answers: 10,421 Site admin
    Thanks for the link. I don't have immediate access to a Windows machine at the moment to test IE7 but I will take a look when I do. It should do as you say, but I've found in the past that IE6/7 does some weird stuff with the scrollbar width, so I'm not hugely surprised!

    With the Firefox 5 issue, it seems to work okay in Firefox 5 for me (Mac version - I'll check Windows later on as well). I'm not sure what would cause it to overflow like that.

    Allan
  • allanallan Posts: 63,258Questions: 1Answers: 10,421 Site admin
    Yup got it (both issues - funny that Firefox is different on the PC!) - I'll investigate and hopefully fix as soon as possible (if not today then by the end of the week). I'll post back when I've got a fix :-)

    Allan
  • PinocchioPinocchio Posts: 2Questions: 0Answers: 0
    Hi Allan!

    for the greate MSIE I tryd this, and working fine. The compromise is, in IE always show the vertical scrollbar.
    [code]var ver = navigator.appVersion;if (ver.indexOf("MSIE") != -1){f.style.overflowY="scroll"} else {f.style.overflow="auto"}[/code]

    Steve
  • loadxloadx Posts: 1Questions: 0Answers: 0
    Hi Allan,

    Do you have a patch for this? I'm using 1.8.2-dev and still finding this issue occurs in Firefox5 on mac.

    I'm using infinite scrolling where my list of results hasn't exceeded sScrollY's height yet.

    At a last resort just having the vertical scroll-bar show always would be suffice but this seems to be a real issue under firefox as overflow cant be constrained to just the Y axis from what i can see.
  • bloodersblooders Posts: 10Questions: 0Answers: 0
    edited January 2012
    I had a similar issue and use the following workaround to force a vertical scroll bar just prior to recalculating the column widths:

    [code]
    $('.dataTables_scrollBody').css('overflow-y', 'scroll');
    $('.dataTables_scrollBody>table').dataTable().fnAdjustColumnSizing(true);
    [/code]

    It's not ideal but the UI is predictable.
  • allanallan Posts: 63,258Questions: 1Answers: 10,421 Site admin
    Hi blooders,

    Could you possibly try this with the current 1.9 nightly please: http://datatables.net/download ? I've just tried the old test page with 1.8.2 where the problem is perfectly visible, and put in the 1.9 nightly and the problem is fixed. So I think I've already got this one sorted (must admit I don't remember doing it, but its certainly working now it was a good few months ago... :-) ).

    Regards,
    Allan
  • bloodersblooders Posts: 10Questions: 0Answers: 0
    edited January 2012
    Hi Allan,

    Thanks for the reply and all the good work. I've just tried the nightly build and I get the following:

    [quote]
    DataTables warning (table id = 'All-selected'): Requested unknown parameter '1' from the data source for row 0
    [/quote]

    It looks like there's difference in the way in which the tables are initialised in the latest version, but then I may have been doing it wrong with 1.8.2. It's blowing up in _fnGatherData with 'nCell is undefined'

    [code]
    /* Classes */
    if ( bClass )
    {
    nCell.className += ' '+oCol.sClass;
    }
    [/code]

    I'm not around tomorrow but I'll see if I can work out what's happening and get back to you on Friday.
  • allanallan Posts: 63,258Questions: 1Answers: 10,421 Site admin
    Hmmm - that shouldn't be the case! DataTables 1.9 should be as backwards compatible as possible, and it certainly shouldn't require different initialisation!

    I'd really appreciate if you if you could give me a link to your page (PM me if you like) so I can figure that out (before releasing 1.9.0 final :-) ).

    Thanks,
    Allan
  • bloodersblooders Posts: 10Questions: 0Answers: 0
    Hi Allan

    All tables now initialise correctly with beta 4 - thanks for that.

    The changes you've made to scrolling are great. I've got a lot of different scrolling tables and scrolling works fine without any workarounds.

    Just for information, there are still the odd few (minor) interesting characteristics across browsers:

    Ubuntu 10.04:
    - Chrome 17.0.963.33 beta - no problems.
    - Opera 11.60 - no problems.
    - Firefox 3.6.24 - It seems there's about a pixels error in the width calcs as when y-scroll is displayed, the horizontal scrollbar is also shown (but with minimal scroll). Note, If this becomes too annoying I can workaround it by switching off x-scroll for tables where it is not relevant.

    Windows 7:
    - Chrome 16.0.912.77 - no problems.
    - Opera 11.61 - no problems.
    - Firefox 9.0.1 - as Firefox above.
    - IE 8.0.7601.17514:
    - Compatibility view off - doesn't seem to include the y scrollbar width in the column width calcs and adds an x-scroll for this amount when y-scroll is shown. This is regardless of the length of the rows' text content.
    - Compatibility view on - Example, table has four visible rows, when it is populated with 1 or 2 rows np. 3 rows it adjusts the column width for the y scrollbar, but doesn't show it. 4 rows is as 3. 5 rows, it shows both scrollbars but x-scroll scrolls only a tiny amount, i.e. it is very similar to Firefox above.

    I'll continue using the beta, watching for any updates and pass on any observations.

    Thanks again, I'm getting great feedback, especially on usability, for pages with DataTables (and TableTools).
This discussion has been closed.