FixedHeader / Bootstrap / Mobile Device

FixedHeader / Bootstrap / Mobile Device

bucketfanbucketfan Posts: 6Questions: 0Answers: 0
edited December 2013 in FixedHeader
I am trying to use FixedHeader with Bootstrap Datatables on a mobile device.

When the table is panned sideways, the table body moves, and then when it stops moving the table heads "jump" or "snap" to the appropriate position.

I am wondering if anyone has done any work, or plans to, to enable this to be a seamless scroll that moves the tbody and the thead simultaneously on a mobile device (like it does on a full browswer). I understand why it is happening at the end, and it's just a bit over my head to make this modification myself.. but it sure would be nice =) I think in trying to make the perfect functionality this would be needed.

If no one has I will add this to my ever growing weekend project list. Thanks!

Replies

  • allanallan Posts: 63,691Questions: 1Answers: 10,500 Site admin
    The problem here is that mobile devices don't fire the `scroll` event while the scrolling is actually happening like desktop browsers do - this is to save battery life on the processing that would otherwise occur.

    It would appear that the browsers don't even fire scrollstart and scrollend so we could so an interval timer in-between. However, jQuery UI have a workaround for the it would appear from this SO thread: http://stackoverflow.com/questions/3803861/detect-scroll-event-on-android-browser . So I think that is probably the answer - that plus an interval timer firing the scroll event handlers itself.

    I'm not aware of anyone having done this I'm afraid, if if you give it a pop, I'd certainly be interested in hearing how you get on!

    Regards,
    Allan
This discussion has been closed.