You found a bug! We've classified it as TOUCH-4318 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Apr 2008
    Posts
    269
    Vote Rating
    31
    themightychris has a spectacular aura about themightychris has a spectacular aura about

      0  

    Default 2.2.1 - PullRefresh widget can get stuck if you scroll down after release

    2.2.1 - PullRefresh widget can get stuck if you scroll down after release


    The PullRefresh plugin sets a translate on its widget equal to the magnitude of the list's scroll position when onBounceTop is called, which is every time the scroll event fires with a y position less than or equal to 0. The translate isn't modified anywhere else and so the plugin relies on the scroller scrolling through y=0 to hide the widget.

    I haven't been able to reproduce this on the desktop, but on an iOS device a quick scroll down after activating the pull refresh can leave the widget stuck hanging over the list because the scroll event can skip past 0 if flicked.

    This patch prevents this by resetting the translation to 0 on any scroll event past y=0:
    Code:
    Ext.define('Jarvus.touch.patch.StickyPullRefresh', {
        override: 'Ext.plugin.PullRefresh',
    
        onScrollChange: function(scroller, x, y) {
            var me = this,
                tr = me.getTranslatable();
            
            me.callParent(arguments);
            
            // ensure pullrefresh widget is hidden when list gets scrolled
            if (y > 0 && tr.y > 0) {
                tr.translate(0, 0);
            }
        }
    });
    Chief Architect @ Jarv.us Innovations
    Co-captain @ Code for Philly

    Jarvus builds and optimizes top-quality Sencha Touch and ExtJS apps for open-source projects and clients of all sizes.

    Don't waste time with bugs that have already been found and fixed by the community, compile our tried and tested hotfixes packages into all your projects: https://github.com/JarvusInnovations/sencha-hotfixes

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    3,978
    Vote Rating
    132
    fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all

      0  

    Default


    Thank you for sharing your solution. This is a known issue TOUCH-4318. I will pass your override on to Engineering.

  3. #3
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    3,978
    Vote Rating
    132
    fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all

      0  

    Default


    Just to make sure we are on the same page. This is image reflects the issue you are experiencing.
    Attached Images

  4. #4
    Sencha Premium Member
    Join Date
    Apr 2008
    Posts
    269
    Vote Rating
    31
    themightychris has a spectacular aura about themightychris has a spectacular aura about

      0  

    Default


    That looks like it, but there could be other ways to cause it... usually in the case I described it gets stuck partially off the screen
    Chief Architect @ Jarv.us Innovations
    Co-captain @ Code for Philly

    Jarvus builds and optimizes top-quality Sencha Touch and ExtJS apps for open-source projects and clients of all sizes.

    Don't waste time with bugs that have already been found and fixed by the community, compile our tried and tested hotfixes packages into all your projects: https://github.com/JarvusInnovations/sencha-hotfixes

Thread Participants: 1