Skip to content

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

Merged
rochal merged 1 commit intorochal:masterfrom
joshuaballoch:dynamic-isOverPanel
Aug 31, 2014
Merged

[Critical Bug] dynamically assign isOverPanel to reduce mistaken mousewheel captures#122
rochal merged 1 commit intorochal:masterfrom
joshuaballoch:dynamic-isOverPanel

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.

3 participants

Comments