@kottan That is very interesting. For me it works perfectly. When I scroll down after side-scrolling it jumps straight to where it needs to be.
It gets the bounding rectangle for the scroll body which should tell us how far away from the edge of the screen it is. I'm curious if your table is maybe nested in some sort of element that is setting a fixed position or doing something else that is messing with the bounding rectangle dimensions. Your table doesn't happen to be within another element that is scrolling on the X axis is it? That would definitely throw it off. If that is the case you will have to edit the code to take into account the parent scroll's bounding rectangle and x-scrolling position (just like how it does currently for the nTableBody).
Answers
Put this into JS
put this into style
@kottan That is very interesting. For me it works perfectly. When I scroll down after side-scrolling it jumps straight to where it needs to be.
It gets the bounding rectangle for the scroll body which should tell us how far away from the edge of the screen it is. I'm curious if your table is maybe nested in some sort of element that is setting a fixed position or doing something else that is messing with the bounding rectangle dimensions. Your table doesn't happen to be within another element that is scrolling on the X axis is it? That would definitely throw it off. If that is the case you will have to edit the code to take into account the parent scroll's bounding rectangle and x-scrolling position (just like how it does currently for the nTableBody).
Sorry for the late reply.