Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8242122

Total deltas for scroll events from mouse wheel are wrong

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx14
    • javafx
    • None
    • MacBook Pro Retina
      java.runtime.version: 14-ea+30-1385
      javafx.runtime.version: 14-ea+7

      but I have seen this on Windows too.

      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

            kcr Kevin Rushforth
            mpaus Michael Paus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: