Make sure the alert dialog is really modal
authorJaroslav Tulach <jtulach@netbeans.org>
Tue, 15 Jul 2014 21:03:41 +0200
changeset 730ef743bfe7561
parent 729 0f8827288b31
child 731 d45df29f6d6f
Make sure the alert dialog is really modal
boot-fx/src/main/java/org/netbeans/html/boot/fx/FXBrwsr.java
     1.1 --- a/boot-fx/src/main/java/org/netbeans/html/boot/fx/FXBrwsr.java	Mon Jul 14 17:31:20 2014 +0200
     1.2 +++ b/boot-fx/src/main/java/org/netbeans/html/boot/fx/FXBrwsr.java	Tue Jul 15 21:03:41 2014 +0200
     1.3 @@ -121,6 +121,7 @@
     1.4              return INSTANCE.newView(url, onLoad);
     1.5          }
     1.6      }
     1.7 +    private Stage stage;
     1.8  
     1.9      @Override
    1.10      public void start(Stage primaryStage) throws Exception {
    1.11 @@ -133,6 +134,7 @@
    1.12          primaryStage.setScene(scene);
    1.13          primaryStage.show();
    1.14          this.root = r;
    1.15 +        this.stage = primaryStage;
    1.16      }
    1.17  
    1.18      private WebView newView(final URL url, final FXPresenter onLoad) {
    1.19 @@ -143,6 +145,7 @@
    1.20              public void handle(WebEvent<String> t) {
    1.21                  final Stage dialogStage = new Stage();
    1.22                  dialogStage.initModality(Modality.WINDOW_MODAL);
    1.23 +                dialogStage.initOwner(stage);
    1.24                  dialogStage.setTitle("Warning");
    1.25                  final Button button = new Button("Close");
    1.26                  final Text text = new Text(t.getData());