jstoudt / enscroll

A jQuery plugin for custom scrollbars
http://enscrollplugin.com
Other
73 stars 46 forks source link

Scrollhandle dragging stops when mouse leaves window #39

Open MRVerv opened 10 years ago

MRVerv commented 10 years ago

When you are dragging the scroll-handle and the mouse leaves the window. the dragging stops. This is unexpected, as normal scroll-bars do not exhibit this behavior.

It can be fixed in the enscroll.js code by attaching the 'mouse-move' and 'mouse-up' event-handlers to the window-element instead of the body-element (and commenting out the explicit 'on mouse-out end drag' event-handlers). So far I have not encountered any problems with this modification.

MRVerv commented 10 years ago

I found that the above modification disabled dragging on IE8, but making the modification conditional on "('onmousemove' in window)" solved that problem.