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

PointerEvent: buttons property set to 0 when mouse down

XMLWordPrintable

    • web
    • x86_64
    • windows_10

        ADDITIONAL SYSTEM INFORMATION :
        Windows 10
        JavaFX 17

        Note that it works fine with previous versions of JavaFX.

        A DESCRIPTION OF THE PROBLEM :
        When the provided HTML is opened in WebView and one tries to drag over the document (with mouse button down), the value of "event.buttons" is 0 when it should be 1 (at least this is how it works in all other major browsers).

        Note that this issue is highly related to:
        JDK-8278150
        ... but since it was closed (I presume mistakenly) I am creating a new ticket.

        REGRESSION : Last worked in version 16.0.2

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Open the provided test case inside WebView.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        When dragging with mouse over the document (with mouse button down), the value of "event.buttons" should be 1.
        ACTUAL -
        When dragging with mouse over the document (with mouse button down), the value of "event.buttons" is 0.

        ---------- BEGIN SOURCE ----------
        <!doctype html>
        <body style="height: 200px">
          <p>Click and drag & observe the console output</p>

          <script>
            var onMove = function (e) {
              console.warn("e.buttons: " + e.buttons);
            }
            
            var body = document.getElementsByTagName('body')[0];
            document.addEventListener("pointermove", onMove, false);
          </script>
        </body>
        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        No workaround present.

        FREQUENCY : always


          1. a.html
            0.4 kB
            Praveen Narayanaswamy
          2. WebViewLeafletSCSSE.java
            0.8 kB
            Praveen Narayanaswamy

              hmeda Hima Bindu Meda
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: