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

[Critical Bug] dynamically assign isOverPanel to reduce mistaken mousewheel captures #122

Merged
merged 1 commit into from Aug 31, 2014

Conversation

joshuaballoch
Copy link
Contributor

I found that slimScroll was causing my mousewheel behaviour to break (become completely inoperable) occasionally.

Steps to replicate:

  1. initialize a slimScroll element
  2. hover over the element
  3. destroy slimScroll while still hovering over the element
  4. Try to scroll in the browser window

Expect:

  1. Scroll works normally

Get:

  1. Scroll does not work at all, in any browser.

The cause:

  1. if slimScroll gets destroyed while the mouse is hovered over the scroll (e.g. if the slimScroll content has a link, in a pushState site),
  2. isOverPanel is still assigned as true at the point of destroying slimScroll
  3. then, _onWheel will execute instead of a normal browser scroll..

This pull request suggests changing isOverPanel to a simple function that gets assessed at the time it is needed, to avoid false assignments.

rochal added a commit that referenced this pull request Aug 31, 2014
[Critical Bug] dynamically assign isOverPanel to reduce mistaken mousewheel captures
@rochal rochal merged commit d020201 into rochal:master Aug 31, 2014
@alvarotrigo
Copy link

This fork introduced another bug as I detailed in this topic.

Not sure what's the solution for your case, but I had to remove part of your code to make it work properly.

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

Successfully merging this pull request may close these issues.

None yet

3 participants