Fixed column scrolls without scrolling the other columns

Fixed column scrolls without scrolling the other columns

johann.sebastianjohann.sebastian Posts: 1Questions: 0Answers: 0

Using a fixed column:

  1. Start scrolling the table (with the mouse hovering the fixed column)
  2. Without stop scrolling, move the mouse to hover the not fixed column

The table breaks and starts scrolling only the fixed column. The inverse happens if you start scrolling in the not fixed column and move the mouse to the fixed column.

It's possible to see this happening in the Datatable's example:
https://datatables.net/extensions/fixedcolumns/examples/initialisation/left_right_columns.html

This wasn't fixed in the nightly.

Replies

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @johann.sebatian,

    Nice one, I can reproduce that. Were you expecting it to be fixed in the nightly build!?

    I'll raise a bug, and make a note for a comment to be made here once fixed.

    Cheers,

    Colin

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    This is proving to be surprisingly difficult to fix!

    What is happening is that you can continue to scroll an item when you mouse out of it - e.g. move the mouse of the left out of the left fixed column, to an area outside the DataTable while scrolling with the mouse wheel. It still scrolls!

    The trouble is that there is nothing in the event that is triggered to say that the mouse is no longer in the original element!

    The only way I can think of to fix this is to rewrite FixedColumns to place the floating columns inside the DataTables scrolling container and have that as the single and only scrolling item. That will actually simplify some parts of the code since I won't need to keep track of where the mouse is, but it is going to mean a fairly significant rewrite of the structure of the code.

    That's going to be something for a 3.3 release I think rather than a patch release.

    Allan

This discussion has been closed.