scrolling behaviour
scrolling behaviour
(Datatables used on an Android phone with Firefox:)
When the datatables table is part of a webpage that extends further up and down beyond the table, and the table displays only a part of the rows it contains (e.g. with paging set to 100 rows, but the scrolly area set to only 30vh), I find it difficult to scroll up-down in the table - sometimes, the table contents scroll, but sometimes, the whole page scrolls.
Is there a rule here? There must be some kind of rule but the behaviour doesn't seem very consistent. (This is not a datatables problem I think, but a browser problem maybe.)
It would be good if the webpage would stay fixed if I put my finger on the table to scroll it. But it doesn't.
Is there some kind of trick or workaround?
-Michael
This question has an accepted answers - jump to answer
Answers
Personally I don't think inner scrolling elements work particularly well on mobile for exactly this sort of reason. It will be related to any existing scroll, exactly were you start the scroll and possible the velocity of the scroll, but its likely up to Firefox (possibly also the OS) exactly which element will scroll there I'm afraid. All DataTables does is use CSS
overflow: auto
for that element.Allan