0

I'm trying to have two lists in a phonegap app on iOS that are scrollable, while there's no bounce, etc. I've set the UIWebBounce to false, and I've trapped the touch events so that only the relevant lists (via element ids) will respond to touch move, but if the list is empty or you're at about the last element of the list, then scrolling the list up scrolls the whole page up. iscroll did not seem to work for me, as it acted very weird in some quick tests.

So, the question is: has anyone gotten a single list or two to be scrollable in PhoneGap/ios while COMPLETELY avoiding scrolls of the whole page, and if so how?

user655489
  • 1,316
  • 3
  • 14
  • 21
  • If the whole page is bouncing then your UIWebBounce isn't doing anything. I've done this before a while back but I've since switched to Titanium and I don't remember how I did it. It's possible Apple has made it impossible to avoid that "feature" since then (over a year ago) but I don't know. – Leeish Mar 14 '13 at 04:01
  • @Leeish - the page stays firmly in place no matter where you swipe/scroll on the page EXCEPT if you scroll/swipe in the list and the list is empty or you are near the bottom of it. If I ignore touchmove for the lists, too, then there is no bounce even if you try to scroll in the list... but I need to be able to scroll there :) – user655489 Mar 14 '13 at 11:51
  • That is pretty strange. I'm sorry I can't be more help, it's been a long time since I've used phonegap and I think what you did above is all I had to do if I remember right. Maybe post some code? – Leeish Mar 14 '13 at 14:36
  • ok - have something close to working. Issue seems to be that if the LAST element in the list is visible and you scroll up, it moves the page, no matter the stop-bounce, etc. settings. So, it's a matter of ignoring the touchmove event in that case. Using a combination of http://stackoverflow.com/questions/487073/check-if-element-is-visible-after-scrolling and getting the start y via the touchStart in http://stackoverflow.com/questions/13315044/ios6-javascript-touchmove-event-pass-through-vertical-scroll-afterwards-jquery-a, it seems to work, although I haven't completely wrapped this up. – user655489 Mar 15 '13 at 17:13

0 Answers0