Last Updated: February 25, 2016
· blastbeat

Preventing elastic scroll

$(window).on 'touchmove', (e) ->

$(window).scroll (e) =>
  if $(window).scrollTop() < 2

2 Responses
Add your response

Can't you do something less drastic by just using overflow-y: scroll without using -webkit-overflow-scrolling: touch;

I am assuming you are trying to disable elastic scrolling on iPhones. Isnt using overflow-y: scroll without -webkit-overflow-scrolling exactly that? I might be wrong here, let me know!

over 1 year ago ·

This is not for Apple devises, i try to prevent elastic scroll in my project, but i don't know css well and did it with js :)

over 1 year ago ·