> But left-to-right is a scroll to up, and down-to-up is a scroll to down. So 
> you scroll in both direction at the same time.

Whoa, great catch! That's the problem! This is definitively not the right 
behavior on trackpads; often the user will not scroll exactly horizontally or 
exactly vertically. And it interacts very badly with the momentum feature of 
the trackpad; see for instance the video at 1:13, where the viewport is 
jittering up and down _after_ my fingers have left the trackpad.

The "left-to-right is scroll up" feature is not how native apps work on MacOS, 
so my guess would be it could simply be disabled on MacOS.

Note also that when scrolling with the trackpad in native MacOS apps, the OS 
makes a decision as to whether the scroll is vertical or horizontal, and then 
scrolls in that direction only. The cut-off is 45 degrees, giving the user 
plenty of wiggle room. You can never scroll truly diagonally except by 
zig-zaging.

-- Eirik

On 1/19/16, 11:50 AM, "Sergey Bylokhov" 
<sergey.bylok...@oracle.com<mailto:sergey.bylok...@oracle.com>> wrote:

I am not sure that this is regression or a bug. In your case you scroll
from left-down to right-up.
But left-to-right is a scroll to up, and down-to-up is a scroll to down.
So you scroll in both direction at the same time.

On 19/01/16 19:18, Eirik Bakke wrote:
Hi, macos-port-dev.

Here's another bug report for Swing on Aqua/MacOS. In recent Java
versions (6-12 months, not sure), trackpad scrolling in any JScrollPane
has become extremely jittery, as demonstrated in the following video:

https://vimeo.com/151843642

The source code for the example app used can be found here:
https://gist.github.com/eirikbakke/09a090ab8052d38c8c87
Note that the "implements Scrollable" business is not necessary to
trigger the bug, I just did it to set the getScrollableBlockIncrement to
something higher than 1 so that you'd see the jitter clearly on a video.

This happens in any app that uses a JScrollPane, including the NetBeans
IDE's code editor and other scrollable panels, as well as in trivial
apps like the linked example. The bug occurs consistently, with or
without external monitors attached, at any resolution, and with or
without simulated retina mode enabled. I'm on a 13-inch mid-2012 MacBook
Air.

If no one knows about an existing bug report about this, I'll submit it
on http://bugreport.java.com<http://bugreport.java.com/> (I searched
bugs.openjdk.java.net ).

-- Eirik



--
Best regards, Sergey.

Reply via email to