[Bug] Ctrl f search on a column name breaking the horizontal scrolling

[Bug] Ctrl f search on a column name breaking the horizontal scrolling

kousenkousen Posts: 4Questions: 1Answers: 0
edited January 2016 in Free community support

Is this well known? any possible fix?

To reproduce : open the following link, search with the browser search for e-mail, see the unaligned table head.
https://www.datatables.net/examples/basic_init/scroll_x.html

Answers

  • kousenkousen Posts: 4Questions: 1Answers: 0

    Still no solution

  • glendersonglenderson Posts: 231Questions: 11Answers: 29

    ctrl - F, as in a browser search?

    when I do a ctrl-F (using ie, and type in datatables.net, all the visible entries are highlighted.

    when I do a similar in FireFox, it shows their are 11 entries in the exposed dom as expected.

    What are you seeing that is unexpected?

  • kousenkousen Posts: 4Questions: 1Answers: 0
    edited January 2016

    Yes, browser's search, if you search for a header column name that is to the side of the view (in the example 'e-mail'), only the head of the table moves, not the body of the datatable, making everything unaligned.

    Example (see that the start date values are shown underneat the "e-mail" column)

  • glendersonglenderson Posts: 231Questions: 11Answers: 29

    So, your complaint is that if you search for a column header, that is off screen that the header scrolls into view, but the underlying column does not.

    So, your expecting the scroll of the header to also fire off a scroll event of the body to keep both the header and column in alignment.

    Thanks for explaining the issue ... sorry I don't have an answer.

  • allanallan Posts: 63,195Questions: 1Answers: 10,412 Site admin

    Thank you for flagging this up. The issue is related to the fact that there is a scroll event listener on the scrolling body, but not the header (the user can't scroll that, so I hadn't realised there was need for it).

    Unfortunately the answer isn't just to add a listener in the header element since that would create a double binding. I'll need to have a think about the best way to resolve this. It might take a bit of time due to the backlog.

    Allan

  • kousenkousen Posts: 4Questions: 1Answers: 0

    Any news?

  • allanallan Posts: 63,195Questions: 1Answers: 10,412 Site admin

    Sorry no. I'll post back here when I get a chance to fix it, but as I say, it might be some time.

This discussion has been closed.