Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364369 - [Mac] Mouse wheel scroll increment is too small on Mac OS X
Summary: [Mac] Mouse wheel scroll increment is too small on Mac OS X
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Editor (show other bugs)
Version: 0.3   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 3.0 RC2   Edit
Assignee: Bogdan Gheorghe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-21 11:17 EST by Mark Macdonald CLA
Modified: 2018-05-29 10:18 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Macdonald CLA 2011-11-21 11:17:59 EST
Firefox 9.0
Chrome 16
Mac OS X 10.6.8

1. Open the editor on a large file.
2. Use the mouse wheel to scroll up and down. 

Each "tick" of the wheel moves the viewport by approx. 1/4 of one line. It takes a long time to browse through a file at this speed.

On my Windows machine, the same action scrolls the viewport by about 5 lines.
Comment 1 Ken Walker CLA 2011-11-28 14:17:35 EST
On the Mac in other applications, single click scrolling is similarly slow but relies on the quick scrolling to increase rate at which the editor is advancing (TextEdit, Mail, 

Looking at the comment in textView.js _handleMouseWheel:  I did some experimenting with Safari and Chrome with a MS Mouse and the trackpad.

In Safari 5.1.1
   MS Mouse -> e.wheelDeltaY -> scrolling down varies -12, -32, -48, -72, -180, -228, etc depending on velocity of your scrolling on the wheel so multiples of 12
   Trackpad -> e.wheelDeltaY -> scrolling down varies -3, -9, -18, -126, -234, etc depending on velocity of your track pad two finger scrolling

In Chrome 15.0....
   MS Mouse -> e.wheelDeltaY -> scrolling down varies -120, -240, -360, etc depending on velocity of your scrolling on the wheel so multiples of 120
   Trackpad -> e.wheelDeltaY -> scrolling down varies -3, -9, -18, -126, -234, etc depending on velocity of your track pad two finger scrolling

So the comment:

"In Safari, the wheel delta is a multiple of 120. In order to convert delta to pixel values, it is necessary to divide delta by 40."

Only seems accurate for Chrome with non-Apple mice/trackpads, and NOT Safari?

Changing line 2258 to denominatorY = 10 makes scrolling in Chrome more responsive when trying to scroll fast with the mouse wheel.  If the wheelDeltaY is not divisible by 120 this has no effect (trackpad).

Does not address Firefox it is a different code path.

Thoughts?
Comment 2 Felipe Heidrich CLA 2011-12-05 17:01:44 EST
(In reply to comment #1)
> Thoughts?

I will try this out hopefully tomorrow. For me this is losing game, Silenio and I tried quite a few different denominators in the past but there is always a new version or a new mouse that breaks our 'guess'. I just wish deltaY was consistent across platforms/browser/version.
Comment 3 Ken Walker CLA 2011-12-05 17:04:02 EST
ok, well I have an MS Mouse and several Apple things if you need.
Comment 4 Mark Macdonald CLA 2011-12-05 17:24:08 EST
(In reply to comment #2)
If there's no consistent fix, maybe we could get the user to calibrate it by scrolling an area of known height with the wheel. Then save the result as a pref somewhere. 

This would obviously only be valid for one platform/browser though. Just a crazy/future idea.
Comment 5 Felipe Heidrich CLA 2011-12-16 14:28:51 EST
I tested chrome/firefox/safari with these with 3 mouses
apple mouse
apple magic mouse
ms mouse (IntelliMouse)

apple magic mouse was fast on all browsers
apple mouse maybe a bit slow on firefox, not bad
ms mouse slow on all browsers, the problem seems that the acceleration is too small.


Ken, using the trackpad, is the current scrolling good ?
Comment 6 Felipe Heidrich CLA 2011-12-16 14:32:55 EST
(In reply to comment #1)
> 
> So the comment:
> 
> "In Safari, the wheel delta is a multiple of 120. In order to convert delta to
> pixel values, it is necessary to divide delta by 40."
> 
I think we were talking about Safari 4 here.

If you read the rest of the comment it says:

* In Chrome and Safari 5, the wheel delta depends on the type of the
* mouse. In general, it is the pixel value for Mac mice and track pads,
* but it is a multiple of 120 for other mice. There is no presise
* way to determine if it is pixel value or a multiple of 120.

Mark, what mouse are you using ?
Comment 7 Ken Walker CLA 2011-12-16 14:35:39 EST
(In reply to comment #5)

> Ken, using the trackpad, is the current scrolling good ?

Yes, the trackpad has acceleration so it can be as slow or as fast as needed.  In all of Safari, Firefox and Chrome.
Comment 8 Mark Macdonald CLA 2011-12-19 09:37:15 EST
(In reply to comment #6)
> Mark, what mouse are you using ?

It was a Microsoft mouse.
Comment 9 Mark Macdonald CLA 2012-10-31 10:27:49 EDT
(In reply to comment #4)
> (In reply to comment #2)
> If there's no consistent fix, maybe we could get the user to calibrate it by
> scrolling an area of known height with the wheel. Then save the result as a
> pref somewhere. 

I was reading about recent changes to the CodeMirror editor, and apparently it now does something similar to this automatically:

> Self-adjusting, non-invasive scroll prediction
> It does several things. First, it contains a number of crude, hard-coded, 
> browser-detected constants to use as a first approximation of wheel-delta-to-pixels rates.
> 
> Then, it listens to wheel events, but never calls preventDefault on them or does 
> scrolling in response to them. Instead, it responds by setting a timeout to observe 
> the amount of pixels that the wheel event did scroll the content, and uses that to 
> tweak its delta-to-pixel rate at run-time.

http://marijnhaverbeke.nl/blog/a-pathological-scrolling-model.html
Comment 10 Bogdan Gheorghe CLA 2013-06-07 14:54:37 EDT
Made some changes to base scrolling rate on elapsed time in between individual scrolling events.

Fixed in master.
Comment 11 Jason CLA 2018-05-29 10:18:39 EDT
I didn't know how to re-open this, so I've created a new bug here:  https://bugs.eclipse.org/bugs/show_bug.cgi?id=535277

I am having this exact same issue.  Each "tick" of my mouse scroll wheel is not moving the java code editor by enough pixels.  And I have a potential idea for a fix.  Historically, the problem was that the mouse hardware would report an arbitrary number of how much the scroll wheel scrolled.  For example, it would say "Mouse-Scrolled-Up 40".  And then it was anyone's best guess to transform that 40 into a number of pixels.

I suggest that at a MINIMUM, one line of text is scrolled per tick, for any non-zero integer reported by the mouse.  Right now, I slowly scroll my mouse 10 ticks, and it only moves the editor like 6.5 lines.  Why would the user ever want to scroll a half-line of text?  It doesn't make sense.

Thank you for considering this fix.