azoff / overscroll

Touch scrolling for the browser
http://azoff.github.io/overscroll
414 stars 82 forks source link

Init scroll position after removeOverscroll #107

Open Colir opened 10 years ago

Colir commented 10 years ago

Hi, i 'm searching a solution to re-init the scroll position after removingOverscroll.

I've a div which use overscroll, and which is sometine display and sometine not. When i hide it, i removeOverscroll When i show it i apply overscroll.

But in all case, overscroll keep the scroll position, even after removing it.

Do you have a solution ?

thanks a lot, and thanks too for this essential plugin

manticorp commented 10 years ago

I have this same issue:

Tried commenting out that line (368), but doesn't make a difference. Events are still firing even after calling removeOverscroll.

ColoradoWebGuy commented 10 years ago

I need this feature too.. I have a div that also uses overscroll, and it will display upon the user's preferences.

Same as colir; when I hide it, I removeOverscroll, and when I show it, I apply overscroll. The only bummer is that the plugin does nothing when I re-initiate overscroll.

jscontrust commented 10 years ago

manticorp: I had the same problem - I think the problem is, that if you add draghold option, a listener is added to the document, and when you call removeOverscroll, only the listeners to the specific selector is removed. My solution was to just not use dragHold, then removing the overscroll works fine...