Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck scroll position #482

Closed
alexbainbridge opened this issue Jan 27, 2014 · 25 comments
Closed

Stuck scroll position #482

alexbainbridge opened this issue Jan 27, 2014 · 25 comments
Milestone

Comments

@alexbainbridge
Copy link

As per http://forum.ionicframework.com/t/default-scrolling-problem/536

This happens quite a lot and makes the scroll experience jumpy. What happens is that the scroll seems to go "off page" - and then stay there.

Specifically, this seems to happen on scrolling content that has pull to refresh active

@CoenWarmer
Copy link

I can also verify that this happens on occasion. Difficult to reproduce reliably, but it's definitely something that needs attention as it's such a basic element of the framework.

@ghost ghost assigned mlynch Jan 29, 2014
@calendee
Copy link

I see it from time to time too. However, it is not limited to PTR in my experience.

@CoenWarmer
Copy link

Agree with calendee, it happens regardless of PTR.

@mlynch
Copy link
Contributor

mlynch commented Feb 1, 2014

Yep, this needs to be fixed, I keep reproducing it myself. We will get this fixed next week!

@ghost ghost assigned ajoslin Feb 2, 2014
@adamtwiss
Copy link

I've been able to recreate this reliably on IOS by taking the sample seed app (with the pets) and adding entries. If you one way fast (such that gravity scroll would take you off the end) and then scroll slightly back in opposite direction it freezes. It never freezes if you move within the scroll bounds.

@adamdbradley adamdbradley added this to the 0.9.24 milestone Feb 3, 2014
@ajoslin ajoslin closed this as completed in 59c10d4 Feb 3, 2014
@ajoslin
Copy link
Contributor

ajoslin commented Feb 3, 2014

Thanks for the reports and ways to reproduce. It shouldn't get stuck anymore. Read the commit message if you're interested in why it was messing up.

Test it out and let us know how it works!

@CoenWarmer
Copy link

Terrific!! Will test now. Thanks guys!!

@alexbainbridge
Copy link
Author

Sadly I don't think this is fully fixed

I can still get the content stuck fully off screen (not related to PTR I see, correcting my earlier thought on this)

@ajoslin
Copy link
Contributor

ajoslin commented Feb 6, 2014

Hey @alexbainbridge! OK. Can you post the code and device that gives you problems? can you also give a screenshot?

I think it can only bug if you have very specific scroll height combined with a specific acceleration of scroll.

@alexbainbridge
Copy link
Author

I just got it to happen on this codepen http://codepen.io/anon/pen/aKycF (from issue #425)
Problem is its incredibly difficult to repeat.
Appreciate not being helpful here - apart from pointing out that its not as fixed we think it is!

@CoenWarmer
Copy link

I'm afraid I agree with @alexbainbridge... Content still occasionally sticks. Due to the difficulty in reproducing I can't tell whether the latest commit had made things better or not. Sorry guys, I think this issue needs to be reopened.

@ajoslin
Copy link
Contributor

ajoslin commented Feb 9, 2014

OK, reopening! I have a few more ideas floating around at why zynga scroller is being funny.

@ajoslin
Copy link
Contributor

ajoslin commented Feb 11, 2014

Ok @alexbainbridge @CoenWarmer would you guys mind testing this again (nightly build should be updated on cdn within 20 minutes of this post).

I added a check that will always re-start the scroll if it stops beyond the boundaries.

I am consistently unable no matter how hard I try now to get this to get stuck now. :-)

@CoenWarmer
Copy link

Trying it out now- looks good so far @ajoslin!

@CoenWarmer
Copy link

@ajoslin I hate to bear bad news but I'm afraid it's still there. It's getting really rare now but it's there.

I've made a screen capture http://www.youtube.com/watch?v=extW9E2EcJc, after about 48 seconds of frantic scrolling the content does stick again.

@ajoslin
Copy link
Contributor

ajoslin commented Feb 12, 2014

Thanks @CoenWarmer! I'll look into I some more.

ajoslin added a commit that referenced this issue Feb 12, 2014
@ajoslin
Copy link
Contributor

ajoslin commented Feb 12, 2014

Hey @CoenWarmer - I just fixed something - I think the problem was when the scroll velocity was really low absolute value and below 0.

I tried bouncing it for about a minute and couldn't get it to stick. But you seem to be the skilled one here at reproducing! Lemme know how it works for you!

ajoslin added a commit that referenced this issue Feb 12, 2014
@CoenWarmer
Copy link

Ok I'm gonna try this as soon as I can. Thanks again for your determination in sorting this out @ajoslin !

@adamdbradley adamdbradley modified the milestones: 0.9.25, 0.9.24 Feb 12, 2014
@CoenWarmer
Copy link

Well @ajoslin there's good news and there's bad news. The bad: it still sticks sometimes.
The good: I can now reproduce it reliably in the browser (Chrome) and iOS simulator.

Here's the video of the latest nightly: http://www.youtube.com/watch?v=jnb7bej2MgU

I can reproduce the behavior by tapping and pushing upwards (I think downwards works too) twice in very rapid succession. If you do this fast enough, the content sticks.

Other issues that were fixed relatively recently such as the click handler firing twice if you tap it fast enough come to mind when looking at this bug. Could it be related to that in some way?

@CoenWarmer
Copy link

After some further research on an actual iOS device I have found it might actually a bit different than I previously thought.

On device I can't get it to stick in the same way by frantically pushing upward. My new hypothesis is this:

  • Push upwards on the content
  • Content goes up, then moves back down.
  • When the content has nearly returned to its original position and the speed of movement has nearly reached zero, push upwards again.
  • Content gets stuck.

The time spent on touch on the second motion could be related to the content sticking, but I'm not sure. I'm currently thinking it has more to do with the speed of the content nearly being zero when initiating a second movement.

@ajoslin
Copy link
Contributor

ajoslin commented Feb 12, 2014

Thanks @CoenWarmer! I'll look into it some more.

@ajoslin
Copy link
Contributor

ajoslin commented Feb 13, 2014

OK @CoenWarmer! Great research! Helped me a lot.

I found out that my check to see if the scroll was stopped was sometimes checking if the scroll was <=0! It was:

var isStoppedY = Math.abs(self.__decelerationVelocityY) <= self.__minDecelerationScrollTop;

But __minDeceleratingScrollTop is dynamically calculated and is sometimes 0 :-)

Now it's:

var isStoppedY = Math.abs(self.__decelerationVelocityY) <= self.__minVelocityToKeepDecelerating;

And __minVelocityToKeepDecelerating is always a positive number; it's the number used to check 'should we stop scrolling?'

Lemme know how it works now! I was able to consistently reproduce given your explanation before the fix, and now I can't.

@CoenWarmer
Copy link

4757-omg-so-amazing

YES!! @ajoslin I've been dragging my thumbs raw but I can't get the content to stick anymore! Thanks for your dedication in tracking this devious little (but crucial) bug down- you're the best.

@ajoslin
Copy link
Contributor

ajoslin commented Feb 17, 2014

Fixed :-)

@whitecat
Copy link

I am facing this issues also now. I scroll a bit on the page and the scroll bar get stuck and starts producing the error: TypeError: zyngaCore.effect.Animate.route is not a function. (In 'zyngaCore.effect.Animate.route(self.__isDecelerating)', 'zyngaCore.effect.Animate.route' is undefined)

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants