Scrolling stops working when setting data source

3 posts, 0 answers
  1. RP Axio
    RP Axio avatar
    1 posts
    Member since:
    Nov 2012

    Posted 22 Nov 2012 Link to this post

    We have a listview which is populated every 5 seconds with data from a database using AJAX. Normally everything works correctly, including scrolling. However if the user has their finger on the screen (listview) when we set the data source then for some reason scrolling no longer works even though the content of the listview is updated.

    This only seems to be a problem with iOS.

    Once the AJAX has completed we use the following code to set the data source.

    Any thoughts on what might cause this?
  2. David
    David avatar
    2 posts
    Member since:
    Aug 2012

    Posted 28 Nov 2012 Link to this post

    KendoUI have been able to reproduce the problem and are investigating.
  3. David
    David avatar
    2 posts
    Member since:
    Aug 2012

    Posted 13 Dec 2012 Link to this post

    Work around from KendoUI. We omit scroller.reset() so the scroll bar position doesn't get reset.

    Currently we can suggest a workaround that uses fake event to end the scrolling action. Please check this example.
    In order to test it on your real project you should put the following code in the change event of the DataSource which will fire after ListView data is re-read.

    var scroller = app.scroller();
    var touches = scroller.userEvents.touches;
    var dummyEvent = { event: { preventDefault: $.noop } };
    for (var i = 0; i < touches.length; i ++) {
Back to Top