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

Webview never rendered after stage has been maximized and iconified

    XMLWordPrintable

Details

    • web
    • x86
    • windows_7

    Description

      FULL PRODUCT VERSION :
      java version "1.8.0_112"
      Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
      Java HotSpot(TM) Client VM (build 25.112-b15, mixed mode, sharing)


      ADDITIONAL OS VERSION INFORMATION :
      MINGW64_NT-6.1 Daniel-Weil-PC 2.6.0(0.304/5/3) 2016-09-09 09:46 x86_64 Msys

      A DESCRIPTION OF THE PROBLEM :
      WebView not rendered in Javafx after stage been maximized and iconified

      REGRESSION. Last worked in version 8u92

      ADDITIONAL REGRESSION INFORMATION:
      java version "1.8.0_112"
      Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
      Java HotSpot(TM) Client VM (build 25.112-b15, mixed mode, sharing)


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile the attached example.
      1) Click on "addWebView" button to check a webview is added
      2) Maximized the window
      3) Iconify the window
      4) Un-iconify window
      5) Click on "addWebView" button : no new webView is displayed
      6) Un-maximized window, the new webView is displayed!!!


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      /*
       * To change this license header, choose License Headers in Project Properties.
       * To change this template file, choose Tools | Templates
       * and open the template in the editor.
       */
      package bugwebview;

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.control.Separator;
      import javafx.scene.control.ToolBar;
      import javafx.scene.layout.VBox;
      import javafx.scene.text.Text;
      import javafx.scene.web.WebView;
      import javafx.stage.Stage;

      /**
       *
       * @author Daniel
       */
      public class BugWebView extends Application {

          private VBox root;
          private VBox webViews;

          @Override
          public void start(Stage primaryStage) {
              Button addWebView = new Button();
              addWebView.setText("AddWebView");
              addWebView.setOnAction(e -> {
                  WebView webView = new WebView();
                  webView.getEngine().loadContent("hello world");
                  webViews.getChildren().add(webView);
              });
              Button clear = new Button("clear");
              clear.setOnAction(e -> webViews.getChildren().clear());

              webViews = new VBox();
              root = new VBox();
              root.getChildren().addAll(
                      new ToolBar(addWebView, clear),
                      new Text("To reproduce:\n1)Maximize this windows\n2)Iconify Window\n"
                              + "3)Uniconify\n4)click on AddWebView button"),
                      new Separator(),
                      webViews);
              Scene scene = new Scene(root, 300, 250);

              primaryStage.setTitle("bug WebView not refreshed!");
              primaryStage.setScene(scene);
              primaryStage.show();
          }

          /**
           * @param args the command line arguments
           */
          public static void main(String[] args) {
              launch(args);
          }

      }

      ---------- END SOURCE ----------

      Attachments

        Issue Links

          Activity

            People

              mbilla Murali Billa
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: