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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 7u15, 8
    • javafx
    • windows 7 64-bit
      mac osx

    • web

      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>

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Imported: