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

[macos] app menu items are disabled after opening new folder dialog inside chooser

    Details

      Description

      ADDITIONAL SYSTEM INFORMATION :
      the next behavior was tested under macos 10.14.6 and 10.15.3, openjdk 13.0.1, openjavafx 13.0.1.

      A DESCRIPTION OF THE PROBLEM :
      the problem is that all mac's app menu items got disabled after we open a new folder dialog inside a FileChooser or DirectoryChooser, also shortcuts got disabled. the only way to make them enabled again is to close the app by hitting the Quit from the contextual menu in the dock application icon.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. click on the button to open the FileChooser(this is also replicable with a DirectoryChooser)
      2. inside the dialog click in the new folder button.
      3. go to mac's app menu
      4. all items inside the mac's app menu are disabled

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      all mac's app menu items are enabled
      ACTUAL -
      all mac's app menu items are disabled

      ---------- BEGIN SOURCE ----------
      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.layout.VBox;
      import javafx.stage.FileChooser;
      import javafx.stage.Stage;

      public class FileChooserExample extends Application {
          public static void main(String[] args) {
              launch(args);
          }

          @Override
          public void start(Stage primaryStage) {
              primaryStage.setTitle("JavaFX App");

              FileChooser fileChooser = new FileChooser();

              Button button = new Button("Select File");
              button.setOnAction(e -> {
                  File selectedFile = fileChooser.showOpenDialog(primaryStage);
              });

              VBox vBox = new VBox(button);
              Scene scene = new Scene(vBox, 960, 600);

              primaryStage.setScene(scene);
              primaryStage.show();
          }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      we can enable all mac's app menu item, but by using internals(com.sun.glass.ui.Application.GetApplication()) but this is not a feasible option

      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              kcr Kevin Rushforth
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: