Horizontal and vertical scrolling not smooth on mobile browsers (Fixed header/column)
Horizontal and vertical scrolling not smooth on mobile browsers (Fixed header/column)
Hi,
I am having a bit of an issue. I use datatables to display some huge tables on a website. Now, I need to make a mobile version. Everything works fine when I test it from my desktop browser.
On mobile, when you scroll, the fixed column / header do not scoll with the table. Instead, they move in position AFTER the table has been scrolled. (Tested on iPad, iPhone and Android)
You can this this here (With fixed column): http://www.datatables.net/release-datatables/extras/FixedColumns/index.html
or here (with fixed header): http://www.datatables.net/release-datatables/examples/basic_init/scroll_x.html
Any idea? Is there an easy way I could force the scroll?
I am having a bit of an issue. I use datatables to display some huge tables on a website. Now, I need to make a mobile version. Everything works fine when I test it from my desktop browser.
On mobile, when you scroll, the fixed column / header do not scoll with the table. Instead, they move in position AFTER the table has been scrolled. (Tested on iPad, iPhone and Android)
You can this this here (With fixed column): http://www.datatables.net/release-datatables/extras/FixedColumns/index.html
or here (with fixed header): http://www.datatables.net/release-datatables/examples/basic_init/scroll_x.html
Any idea? Is there an easy way I could force the scroll?
This discussion has been closed.
Replies
Allan
Is there a function or something in the API I could fire up that would position the elements correctly which I could play with?
Thanks a lot for the quick response.
Interest to hear how you get on with it!
Allan
The client has accepted to a workaround which doesn't use those features, but I am curious myself so I will definitely put some time on it in my free time.
I use Fixed Column and I have the same little problem than you on ipad. But I can live with it.
However I have a more annoying problem with Fixed Column on Android. The fixed column is not adjusting when scrolling down. Is there any trick to have it work on Android?
Thanks,
Bru
Allan
Thanks,
Allan
I had ended up doing this mess to make it work:
//This empty function makes it so the scroll event is fired
$('.dataTables_scrollBody').on('touchstart',function (e){});