When scroll events are generated via the mouse wheel, the total delta values returned by the event object are not correct.
The documentation says: "The totalDeltaX and totalDeltaY contain the cumulative values for the whole gesture, zeros for mouse wheel". As you can see in the output of the test program below, the total-deltas for y are not zeros. The values are: e.getDeltaX(), e.getTotalDeltaX(), e.getDeltaY(), e.getTotalDeltaY(), e.getTouchCount()
setOnScroll: 0,000000 0,000000 1,000061 1,000061 0
setOnScroll: 0,000000 0,000000 1,000061 1,000061 0
setOnScroll: 0,000000 0,000000 1,000061 1,000061 0
setOnScroll: 0,000000 0,000000 1,000061 1,000061 0
setOnScroll: 0,000000 0,000000 4,296417 4,296417 0
setOnScroll: 0,000000 0,000000 -1,000061 -1,000061 0
setOnScroll: 0,000000 0,000000 -11,195526 -11,195526 0
setOnScroll: 0,000000 0,000000 -38,627014 -38,627014 0
setOnScroll: 0,000000 0,000000 -50,805664 -50,805664 0
setOnScroll: 0,000000 0,000000 -52,142639 -52,142639 0
This was originally reported in the context of https://bugs.openjdk.java.net/browse/JDK-8236971