-
-
Notifications
You must be signed in to change notification settings - Fork 576
Description
Issue summary
Scrolling with the touchpad or a mouse wheel is too fast. This makes it difficult to scroll a specific part of the history. I'm using a Mac, and this happens with both the touchpad and with a mouse scroll wheel, in Chrome, Firefox, and Safari.
This can be tested by going to https://jcubic.github.io/jquery.terminal/, holding down Enter until there are enough lines of output that a scrollbar appears, and then scrolling. The minimum scrolling increment for me is about 2 whole lines. In "normal" web content with a similar font size, the minimum scrolling increment is about 0.1-0.2 lines.
I found that replacing this:
jquery.terminal/js/jquery.terminal.js
Lines 12057 to 12061 in a2d769d
if (delta > 0) { | |
self.scroll(-40); | |
} else { | |
self.scroll(40); | |
} |
with this:
self.scroll(-delta);
results in natural-feeling scrolling behavior, with proper acceleration.
Is there a particular reason that scrolling code sets the scrolling increment to 40?