FixedColumns bug with jQuery 1.9+ : b.browser is undefined

FixedColumns bug with jQuery 1.9+ : b.browser is undefined

JeremieJeremie Posts: 1Questions: 0Answers: 0
edited July 2013 in Bug reports
Hello,
When I use the following code with jQuery 1.8, all is OK, the left-most column is fixed.
But if I try with jQuery 1.9 or 1.10, I got a javascript error : "b.browser is undefined", and the column is not fixed anymore.

(Line 29 on the 1.9.4 minified version of FixedColumns.min.js)

[code]



Fixed
col 1
col 2
col 3




Line 1
a
a
a

Line 2
a
a
a

Line 3
a
a
a





//<![CDATA[
$(document).ready( function () {
var oTable = $('#example').dataTable( {
"sScrollX": "100%",
"sScrollXInner": "150%",
"bScrollCollapse": true
} );
new FixedColumns( oTable);
} );
//]]>
[/code]

Replies

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    This is already fixed in git. Please try the 2.5.0-dev version on the downloads page ( http://datatables.net/download ).

    Allan
  • wernerglinkawernerglinka Posts: 5Questions: 0Answers: 0
    Hi,
    I am using the FixedColumns plugin dev version 2.5.X with jquery 1.10.x and it works. There are however, a couple of minor detail issues. The horizontal scroll bar shows under the whole table not just the scrollable part and when the headers move to the left while scrolling they overlay the fixed column header.
  • wernerglinkawernerglinka Posts: 5Questions: 0Answers: 0
    Never mind the headers overlapping. That is just a CSS issue. However, the horizontal scrollbar is another thing...
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Can you link me to a page showing the errors so I can debug and fix them?

    > The horizontal scroll bar shows under the whole table not just the scrollable part

    That is intentional and part of the major upgrade to FixedColumns :-). I always felt it was a "bug" when the scrollbar didn't span the whole table before.

    Thanks,
    Allan
  • wernerglinkawernerglinka Posts: 5Questions: 0Answers: 0
    Hi Allan,
    Thanks for your reply. I am still evaluating your plugin for use in a large webapp. I need to build a table with a left and right fixed column, column ordering, and an AJAX data source. Table cells should have text-overflow. And everything seems to work as expected but the scrollbar.

    I have posted a sandbox here: http://projects.bussedesign.com/projects4/dataTableEval/

    You can see the scrollbar under the whole table, however, clicking right underneath a fixed column and dragging the toolbar does nothing as the fixed columns extend downwards and cover the scrollbar.

    In firebug you can also see that the scrolling table still has the first and last column in it. The fixed clones cover them up but you can see a little of the last column if you scroll all the way to the right.

    Many thanks you your willingness to look at this.

    Best regards,
    Werner
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    > however, clicking right underneath a fixed column and dragging the toolbar does nothing as the fixed columns extend downwards and cover the scrollbar.

    That's fixed in git - can you try the version here please: https://github.com/DataTables/FixedColumns/tree/master/media/js

    Regards,
    Allan
  • wernerglinkawernerglinka Posts: 5Questions: 0Answers: 0
    I am already using Fixed Columns 2.5.0.dev because otherwise I get an "b.browser is undefined" error for this table setup.

    I am using jQuery 1.10.2
    dataTables 1.9.4
    fixedColumns 2.5.0.dev
    ColRecorder 1.0.8

    In your previous reply you said that the horizontal scrollbar showing under the whole table was intentional. I looked at the examples where you demonstrate this feature and noticed that you had removed the fixed columns from the scrollable table. In the newer version all columns remain and that is probably the reason for the whole width scrollbar.

    I believe the way you had it implemented before is much better from a UI perspective as it gives the user visual queues what to expect.

    Is there a way to return to the previous functionality? Would that be something you would do as a paid support request and if so how much time do you think this would take?
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    You are using a dev version of FixedColumns - but not the very latest one. Can you pick the latest one up from git and try that please? Specifically this is the commit that fixes the issue with not being able to drag the scrollbar under the fixed column: https://github.com/DataTables/FixedColumns/commit/3429ac3

    > I believe the way you had it implemented before is much better from a UI perspective as it gives the user visual queues what to expect.

    Heh - fair enough :-). I've had other feedback saying the opposite, but I think its probably just a question of taste. I'm afraid there is no way to return to the old method since its a complete reimplementation of how the scrolling works. The only thing to do would be to modify the old version of FixedColumns for your use case.

    Allan
  • wernerglinkawernerglinka Posts: 5Questions: 0Answers: 0
    Thanks for the help Allan,
    The latest dev version works.
This discussion has been closed.