1

Can anyone please tell me how they accomplished disabling the "bounce" effect in safari on the iPhone without disabling scrolling completely? I've googled the crap out of this and i can't find a working solution.

i've tried the following:

<script>
 function BlockMove(event) { event.preventDefault();}
</script>

-> this just completely disables scrolling

i've also tried scrollFix.js, and i don't want to resort to using iScroll4 or any bloated JS library. I'm stubborn but there has to be a reliable easy way to fix this right?

asaji
  • 398
  • 4
  • 12
  • Maybe it's not what you want, but http://stackoverflow.com/questions/3128196/iphone-html5-app-scrolling-question/ and http://stackoverflow.com/questions/10761746/disable-vertical-bounce-effect-in-an-ipad-web-app – Alexandre Khoury Jun 14 '12 at 11:21

1 Answers1

1

The only thing I can think of is you need to detect when to stop the bounce, so when you want to stop the bounce then disable scrolling. For example - I am moving my finger down which actually moving the page content up, you need to detect if the page ha reached the top, if so then disable scrolling. When you detect the touch is moving up which means the content is moving down then enable scrolling again unless you hit the bottom of the page. I am assuming this is the bounce effect you are talking about. It's default behavior I don't think you need to get rid of it, unless your client wants it and will not change his/her mind

Huangism
  • 16,278
  • 7
  • 48
  • 74