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

[Quantum] Control ActionEvent is fired on Stage closing and the App hangs if modal window is then shown

    XMLWordPrintable

Details

    Description

      If a value has been selected in the DatePicker and the FileChooser has been shown, then the App hangs if you close the window (FileChooser is visible again).


      import java.time.LocalDate;
      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.DatePicker;
      import javafx.scene.layout.VBox;
      import javafx.stage.FileChooser;
      import javafx.stage.Stage;

      public class Test extends Application {

      @Override
      public void start(Stage stage) throws Exception {
      DatePicker datePicker = new DatePicker(LocalDate.now());
      stage.setScene(new Scene(new VBox(datePicker), 300, 200));
      stage.show();
      datePicker.setOnAction(e -> {
      // Is fired on Stage closing if it was fired by DatePicker once
      // -> VM crash
      new FileChooser().showOpenDialog(stage);
      });
      }

      public static void main(String[] args) {
      launch(args);
      }
      }

      Attachments

        1. instrument-a11y.patch
          3 kB
          Kevin Rushforth
        2. RT-38289.02.patch
          18 kB
          Kevin Rushforth
        3. RT-38289.03.patch
          22 kB
          Kevin Rushforth
        4. RT-38289.patch
          2 kB
          Kevin Rushforth
        5. RT-38289-tests.02.patch
          9 kB
          Kevin Rushforth
        6. RT-38289-tests.03.patch
          9 kB
          Kevin Rushforth
        7. ShowAndWaitHang.java
          4 kB
          Kevin Rushforth
        8. ShowAndWaitHang2.java
          3 kB
          Kevin Rushforth

        Issue Links

          Activity

            People

              kcr Kevin Rushforth
              aliebelt Andreas Liebelt
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: