Scroll bar "sticks" to the top or the bottom of the table

Scroll bar "sticks" to the top or the bottom of the table

MilosMMilosM Posts: 3Questions: 0Answers: 0

I'm encountering a strange scroll bar behavior when using the data tables.
The data loads fine, no errors are displayed and the scroll bar is set to scroll to a specific row in the table on load.
The scroll bar works fine up until the point it is moved to the top or the bottom of the page after which it sticks and wont move using the mouse scroller. I've also noticed that the "sticking" does not happen if scrolling is done fast enough, meaning if I scroll all the way up to the top of the table, and then immediately scroll down, it doesn't stick, but if I leave it at the top for longer than approximately half a second it "sticks" and will no longer work with mouse scroll.
For it to start working I have to manually click and drag it away from top/bottom at least slightly, after which it works fine again(until it ''touches" top or the bottom).
Any ideas as to why this is happening? I am willing to provide the code in use but I'll need a bit of help determining what is relevant as I'm fairly new to data tables and it's my work project.

Replies

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

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • MilosMMilosM Posts: 3Questions: 0Answers: 0

    I'm honestly not quite sure how I would even go about creating a test case as code in use is fairly complicated, and as it's all done locally I can't provide the link to the page.
    Honestly I was hoping it was at least somewhat known issue but I've yet to come across a similar problem. :smile:

  • MilosMMilosM Posts: 3Questions: 0Answers: 0

    On a workaround note, would it be possible to set a min/max scroll bar position so it does not "touch" the top/bottom, or should I make a new post for this?

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    It's not an issue I'm immediately familiar with. Are you using the scroll to row plug-in for this (it sounds like it)? I would suggest starting an example on the live site, enabling options such as scrolling and then whatever you are using to jump to a row.

    Allan

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    would it be possible to set a min/max scroll bar position so it does not "touch" the top/bottom

    Forgot to reply to this point - sorry. No that isn't something that is built into DataTables. You could perhaps add a scroll event listener to do it yourself though. Sounds like a workaround rather than addressing whatever the issue is and might just end up causing other issues :)

    Allan

Sign In or Register to comment.