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

Touchscroll can break on content change #11

Open
tmurison opened this issue May 28, 2010 · 2 comments
Open

Touchscroll can break on content change #11

tmurison opened this issue May 28, 2010 · 2 comments

Comments

@tmurison
Copy link

Procedure:

  1. Create a long content layout
  2. Scroll down to the bottom
  3. Relayout the page to make it much shorter

Result:

Touchscroll does not scroll back up the page giving the effect of a blank page. Furthermore, it is impossible to scroll back up.

@lawpower
Copy link

lawpower commented Jun 1, 2010

Just like to second this as a problem. I've got a page which loads a list of items dynamically based on user action. Tapping the link loads shorter content with ajax in the same div.

The way I "fixed" this is with a min-height of the div being taller than the viewport (I use 500px). This still loads a blank page but with some swipes I can scroll to the content.

In an ideal world, there'd be a method called touchScrollTo or something I could call on the div whenever I load new content, which would reposition things at the top.

A demo of the issue can be found at http://mobile.trioutnc.com/scroll.html, scroll to the bottom, load more locations a few times, the tap a location name.

Love the script, other than this oddity it's been awesome to work with. Thanks!

@ajpalma
Copy link

ajpalma commented Oct 14, 2010

Hi David,
On the page:
http://uxebu.com/blog/2010/04/27/touchscroll-a-scrolling-layer-for-webkit-mobile/
You give a potential fix for this issue.
You said "At the moment you can use “scroller.scrollTo(0, 0)” – on the scroller instance"
I have this issue and don't totally understand your response. where do we put this code in exactly?
Can you show an example?
Thanks,
Palma

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants