Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Infinite scrolling list does not scroll to top on refresh

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha Premium Member robboerman's Avatar
    Join Date
    Nov 2007
    Location
    Pijnacker, the Netherlands
    Posts
    94

    Default Infinite scrolling list does not scroll to top on refresh

    Touch version tested:
    • Touch 2.2.1


    Description:
    • When a list component has been configured as infinite scrolling, the scroller does not scroll to top on refresh when the store is filtered and triggers a refresh. This is because the List component sets position.y=0 on the scroller directly, after that the scroller thinks it's scroll position has not changed and does not apply the scroll position,



    Steps to reproduce the problem:
    • Open the List example in Chrome: http://docs.sencha.com/touch/2.2.1/t...ist/index.html
    • Scroll the list to the bottom
    • Open the Javascript console
    • Enter:
      Code:
      Ext.ComponentQuery.query('list')[0].getStore().filterBy(function(rec) {return rec.get('lastName') === 'Maintz';});



    The result that was expected:
    List scrolled to top, only showing a bunch of Tommy's


    The result that occurs instead:
    No Tommy's. The list is appears empty because the scrollable component is way up.

    Temporary solution:
    Add a hack that tricks the list to scroll up:
    Code:
    /**
     * TOUCH-5057 bug: scroll position on filter change does not jump to top
     */
    
    Ext.define('MyApp.override.dataview.List', {
    	override: 'Ext.dataview.List',
    	scrollToTopOnRefresh: false,
    
    	doRefresh: function() {
    		this.getScrollable().getScroller().scrollTo(0,0.1, false);
    		this.callParent(arguments);
    	}
    });
    Last edited by robboerman; 1 Nov 2013 at 2:02 AM. Reason: small problem in override
    Rob Boerman

    2Gears.com
    Delft, the Netherlands
    Blog: 2gears.com/blog

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108

    Default

    Thanks for the report. This issue appears to have been fixed in Touch 2.3.0
    http://docs.sencha.com/touch/2.3.0/t...ist/index.html
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

  3. #3
    Sencha Premium Member robboerman's Avatar
    Join Date
    Nov 2007
    Location
    Pijnacker, the Netherlands
    Posts
    94

    Default Not fixed

    Unfortunately this has not been fixed in Sencha Touch 2.3.0. Please make sure you scroll down before you apply the filter. See the attached screenshots before and after application of the filter:

    Screen Shot 2013-10-21 at 12.04.17 PM.pngScreen Shot 2013-10-21 at 12.04.33 PM.png
    Rob Boerman

    2Gears.com
    Delft, the Netherlands
    Blog: 2gears.com/blog

  4. #4
    Touch Premium Member hotdp's Avatar
    Join Date
    Nov 2010
    Location
    Denmark
    Posts
    604

    Default

    I have this problem to with 2.3.

    My temp fix it to set:
    scrollToTopOnRefresh:false

    And after adding my filter:
    list.getScrollable().getScroller().scrollToTop(true);

  5. #5
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  6. #6
    Sencha Premium Member
    Join Date
    Jan 2012
    Location
    London, UK
    Posts
    587

    Default

    This one is still there in 2.3.1 guys. What's going on with this?
    ExtJS Websql/Sqlite/IndexedDB/Dynamic proxies: https://github.com/shepsii/extjs-db-proxies

  7. #7
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108

    Default

    This issue is still unresolved but currently scheduled to be in the Touch 2.3.2 release.
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

  8. #8
    Sencha Premium Member
    Join Date
    Jan 2012
    Location
    London, UK
    Posts
    587

    Default

    Thanks, appreciate it - will keep an eye out for it!
    ExtJS Websql/Sqlite/IndexedDB/Dynamic proxies: https://github.com/shepsii/extjs-db-proxies

  9. #9
    Sencha User
    Join Date
    Aug 2012
    Location
    Vancouver, Canada
    Posts
    31

    Default

    Note that I've reported another issue with infinite lists in 2.3.1: http://www.sencha.com/forum/showthre...-Infinite-List.

  10. #10
    Sencha User
    Join Date
    Apr 2012
    Posts
    39

    Default

    Thanks for the work around robboerman. Lists sure took a hit in Sencha Touch 2.2 and 2.3, but at least the user base is great

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •