Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P2
-
Resolution: Not an Issue
-
Affects Version/s: 8u152, 9, 10, 11
-
Fix Version/s: 11
-
Component/s: client-libs
-
Labels:
-
Subcomponent:
-
Introduced In Version:
-
CPU:x86
-
OS:os_x
Description
ADDITIONAL SYSTEM INFORMATION :
JDK 1.8 u112 -> u171, JDK 1.9, JDK 10.0.1
macOS High Sierra 10.13.4
Macbook Pro with Magic Mouse/built-in trackpad/external Mac Trackpad
A DESCRIPTION OF THE PROBLEM :
When scrolling on macOS High Sierra using a magic mouse or a trackpad, Java dispatches several MouseWheelEvent instances with the shift key modifier and a scroll value that is the negative of what is expected.
REGRESSION : Last worked in version 8u161
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Scroll in a Swing JPanel using a magic mouse or magic trackpad.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
- all modEx values are 0
- all scroll values should be consistent with the scroll direction
ACTUAL -
- often events have a modEx value of 64
- in this case, the scroll value is the negative of what is expected
---------- BEGIN SOURCE ----------
Execute the following code and scroll on the panel:
public static void main(String[] args) throws InvocationTargetException, InterruptedException {
EventQueue.invokeAndWait(() -> {
JFrame frame = new JFrame();
JPanel content = new JPanel();
content.setPreferredSize(new Dimension(100,100));
content.addMouseWheelListener(e -> System.out.println("modEx: " + e.getModifiersEx() + " val:" + e.getPreciseWheelRotation()) );
frame.add(content);
frame.pack();
frame.setVisible(true);
});
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
ignore MouseWheelEvent instances with the shift modifier
FREQUENCY : always
JDK 1.8 u112 -> u171, JDK 1.9, JDK 10.0.1
macOS High Sierra 10.13.4
Macbook Pro with Magic Mouse/built-in trackpad/external Mac Trackpad
A DESCRIPTION OF THE PROBLEM :
When scrolling on macOS High Sierra using a magic mouse or a trackpad, Java dispatches several MouseWheelEvent instances with the shift key modifier and a scroll value that is the negative of what is expected.
REGRESSION : Last worked in version 8u161
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Scroll in a Swing JPanel using a magic mouse or magic trackpad.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
- all modEx values are 0
- all scroll values should be consistent with the scroll direction
ACTUAL -
- often events have a modEx value of 64
- in this case, the scroll value is the negative of what is expected
---------- BEGIN SOURCE ----------
Execute the following code and scroll on the panel:
public static void main(String[] args) throws InvocationTargetException, InterruptedException {
EventQueue.invokeAndWait(() -> {
JFrame frame = new JFrame();
JPanel content = new JPanel();
content.setPreferredSize(new Dimension(100,100));
content.addMouseWheelListener(e -> System.out.println("modEx: " + e.getModifiersEx() + " val:" + e.getPreciseWheelRotation()) );
frame.add(content);
frame.pack();
frame.setVisible(true);
});
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
ignore MouseWheelEvent instances with the shift modifier
FREQUENCY : always