FULL PRODUCT VERSION :
1.8.0_40
ADDITIONAL OS VERSION INFORMATION :
Mac OS X 10.10
A DESCRIPTION OF THE PROBLEM :
I'm facing an issue with JavaFX 8u40 where creating two or more modal windows will cause a system beep on Mac OS X when closing the children windows.
The example in the reproduction steps creates a modal window who's a child of another modal window. When I close the child modal window, my system beeps (the same way it beeps if I try to click on the parent modal window).
The problem seems related to stage.initOwner(...) where closing the child modal window tries to access the parent modal window before the showAndWait() loop is finished.
This issue does not occur in Windows.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Create a modal window who is a child of another modal window on Mac OS X
2) Close the inner modal window
3) System will beep
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No beep.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class TestDialog extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) {
Button showModalButton = new Button("Show Modal Window");
showModalButton.setOnAction(e -> {
Stage modalStage = new Stage();
modalStage.initModality(Modality.WINDOW_MODAL);
modalStage.initOwner(stage);
Button createInnerModalButton = new Button("Create inner modal window");
createInnerModalButton.setOnAction(e2 -> {
Stage innerModalStage = new Stage();
innerModalStage.initModality(Modality.WINDOW_MODAL);
innerModalStage.initOwner(modalStage);
Button closeInnerModalButton = new Button("Close");
closeInnerModalButton.setOnAction(e3 -> {
innerModalStage.close();
});
VBox innerVBox = new VBox(
new Label("This is an inner modal window"), closeInnerModalButton);
innerModalStage.setScene(new Scene(innerVBox));
innerModalStage.showAndWait();
});
VBox vBox = new VBox(
new Label("This is a modal window"), createInnerModalButton);
modalStage.setScene(new Scene(vBox));
modalStage.showAndWait();
});
stage.setScene(new Scene(showModalButton));
stage.show();
}
}
---------- END SOURCE ----------
1.8.0_40
ADDITIONAL OS VERSION INFORMATION :
Mac OS X 10.10
A DESCRIPTION OF THE PROBLEM :
I'm facing an issue with JavaFX 8u40 where creating two or more modal windows will cause a system beep on Mac OS X when closing the children windows.
The example in the reproduction steps creates a modal window who's a child of another modal window. When I close the child modal window, my system beeps (the same way it beeps if I try to click on the parent modal window).
The problem seems related to stage.initOwner(...) where closing the child modal window tries to access the parent modal window before the showAndWait() loop is finished.
This issue does not occur in Windows.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Create a modal window who is a child of another modal window on Mac OS X
2) Close the inner modal window
3) System will beep
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No beep.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class TestDialog extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) {
Button showModalButton = new Button("Show Modal Window");
showModalButton.setOnAction(e -> {
Stage modalStage = new Stage();
modalStage.initModality(Modality.WINDOW_MODAL);
modalStage.initOwner(stage);
Button createInnerModalButton = new Button("Create inner modal window");
createInnerModalButton.setOnAction(e2 -> {
Stage innerModalStage = new Stage();
innerModalStage.initModality(Modality.WINDOW_MODAL);
innerModalStage.initOwner(modalStage);
Button closeInnerModalButton = new Button("Close");
closeInnerModalButton.setOnAction(e3 -> {
innerModalStage.close();
});
VBox innerVBox = new VBox(
new Label("This is an inner modal window"), closeInnerModalButton);
innerModalStage.setScene(new Scene(innerVBox));
innerModalStage.showAndWait();
});
VBox vBox = new VBox(
new Label("This is a modal window"), createInnerModalButton);
modalStage.setScene(new Scene(vBox));
modalStage.showAndWait();
});
stage.setScene(new Scene(showModalButton));
stage.show();
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-8097090 With two or more application modal windows; windows deeper in the stack are receiving requestToFront when not enabled causes an NSBeep.
-
- Resolved
-
-
JDK-8088042 [Mac] Dismissing a modal dialog created by another modal dialog causes a beep
-
- Closed
-