Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init scroll position after removeOverscroll #107

Open
Colir opened this issue Mar 20, 2014 · 3 comments
Open

Init scroll position after removeOverscroll #107

Colir opened this issue Mar 20, 2014 · 3 comments

Comments

@Colir
Copy link

Colir commented Mar 20, 2014

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
Copy link

I have this same issue:

  • Set up overscroll on an element
  • Event triggers removal of overscroll
  • Now, there is an error whenever scrolling happens:
    Uncaught TypeError: Cannot set property 'dragging' of undefined jquery.overscroll.js:368
  • Element goes to a left offset of 0 when scrolling stops

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

@ColoradoWebGuy
Copy link

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
Copy link

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants