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

Vertical mouse scrolling does not work without horizontal scrollbar #541

Closed
JellyRollMorton opened this issue Apr 2, 2013 · 3 comments
Closed
Labels

Comments

@JellyRollMorton
Copy link

In version 0.8.17, scrolling vertically via the mouse wheel does not work when the horizontal scrollbar is not visible. Example below:

http://jsfiddle.net/AKXtJ/

It looks like the code may be inadvertently checking for the existence of a horizontal scroll bar to enable vertical scrolling, and a vertical scrollbar to enable horizontal scrolling. I was able to resolve the problem by swapping that.instance.wtScroll.wtScrollbarV.visible and that.instance.wtScroll.wtScrollbarH.visible in the code below:

      if (deltaY) {
        //ceil is needed because jquery-mousewheel reports fractional mousewheel deltas on touchpad scroll
        //see http://stackoverflow.com/questions/5527601/normalizing-mousewheel-speed-across-browsers
        if (that.instance.wtScroll.wtScrollbarV.visible) { // if we see scrollbar
          that.instance.scrollVertical(-Math.ceil(deltaY)).draw();
        }
      }
      else if (deltaX) {
        if (that.instance.wtScroll.wtScrollbarH.visible) { // if we see scrollbar
          that.instance.scrollHorizontal(Math.ceil(deltaX)).draw();
        }
      }
@andrescardona
Copy link

Yes, it is still on the last version.

@milko1
Copy link

milko1 commented May 2, 2013

+1

@warpech
Copy link
Member

warpech commented May 3, 2013

Thanks for reporting. This is just fixed in version 0.8.23

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

No branches or pull requests

4 participants