DataZombies / jQTouch

jQT extensions jqt.activityIndicator, jqt.bars (with numeric badges), jqt.checkGroup & jqt.segmentedControl.Get updates via Twitter http://twitter.com/HeadDZombie. If you find this fork useful please make a donation via PayPal (http://tinyurl.com/2fpmx27). See below for demo links.
MIT License
159 stars 34 forks source link

Confusion about page "position" with iscroll and tabbar #8

Closed giuliano closed 13 years ago

giuliano commented 13 years ago

Hi, in my application I have a page with ajax-loaded content, where on user request other content is appended to the already existing one, always via ajax.

The problem is: if I append additional content to already existing ajax-loaded content, and then scroll to the bottom, leave the page, and load another page, the content of the page appear "already-scrolled", it doesn't show from the top of the windows. This only happen if after appending content I scroll to the bottom, if I append content and leave the page without scrolling to bottom, a new ajax-loaded page show correctly.

This only happen with content appended in a page that already has content loaded via-ajax. If i load content via ajax in an empty page, than scroll to bottom, leave the page and load another, the page works correctly.

You can see this in action here: http://test.insistema.com/pp-iphone/static/ Click "Immobiliare" > "Ville e appartamenti (RM)" scroll to the bottom of the list, click "Carica altri annunci", scroll down again, leave the page, load other content and you will see the content doesn't appear from the start but from the windows position of when you left after loading. It happens also if after the "loading-scrolling-appending-scrolling" Sctions you manually scroll to the top before leaving the page. So I think this is a "position info" that the script save somewhere and reuse when i leave and load other content.

I am working against this bug from days without success. Any help is appreciated.

giuliano commented 13 years ago

Solved deleting all setPageHeight() and init reference from the code. Bizzarre but it works : )