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

UI thread blocked in confirm and alert handlers when they are called by setTimeout

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 7u15, 8
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
    • Environment:

      windows 7 64-bit
      mac osx

    • Subcomponent:
      web

      Description

      When the webview is directed to page with an alert or confirm in a setTimeout function, the UI thread will be blocked in the call/handle functions that were set in setConfirmHandler or setOnAlert. The dialog box will not be drawn and the program will stop repainting. However, The dialog box responds the keyboard.

      This bug does not manifest in a regular browser.

      JOptionPane works as a temporary fix on Windows as the dialog will be drawn, however though the application will not repaint while the dialog is up.

      The HTML below manifests the bug:
      <html>
      <head>
      <script>
      var x =function(){confirm("message")};
      setTimeout(x,250);
      </script>
      </body>
      </html>

        Attachments

        1. Test.java
          2 kB
          Peter Zhelezniakov

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported: