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

[Dialogs] Default button for Alert dialog does not have focus on Mac and Linux

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u40
    • Fix Version/s: 8u40
    • Component/s: javafx
    • Labels:
      None

      Description

      The Alert dialog has the concept of a default button, for example, the "OK" button is the default button for a Confirmation Alert with OK and Cancel buttons. The default button should be both selected and focused when the dialog is shown.

      The default button is selected on all platforms, such that pressing the Enter key will fire the default action and close the dialog. On Windows platforms, this default button also has focus such that pressing the space bar will also fire the default action. However, on Mac and Linux, the "Cancel" button has focus, probably because the order of the buttons is reversed with "Cancel" being on the left and "OK" being on the right. This leads to inconsistent behavior.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jgiles Jonathan Giles
              Reporter:
              kcr Kevin Rushforth
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: