• Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8
    • Fix Version/s: tbd
    • Component/s: javafx
    • Environment:

      Java 1.8.0ea b113 observed on Windows and Linux

    • Subcomponent:


      I have a static page with an inline svg and styles that allow it to resize the svg proportionally up to a max size. It is all working well except that this scenario seems to confuse the WebView's scrollbars.

      Run the provided test case and observe the following issues:

      1. when the scene appears the vertical scrollbar is party showing but without its dragger. If you mouse over the scrollbar it will finish rendering.

      2. drag the bottom of the stage taller so that the scrollbar disappears and then slowly back up. At one point the page will render like it is expecting the scrollbar to appear but the scrollbar does not render. I believe this is because of the proportional sizing of the svg but really the scrollbar should still render in this scenario and just have little or no room to scroll.

      Test Code
      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.layout.StackPane;
      import javafx.scene.web.WebView;
      import javafx.stage.Stage;

      public class WebViewTest extends Application {
         @Override public void start(final Stage primaryStage) throws Exception {

            final WebView webView = new WebView();
            String page =
            "<html>" +
            "<head>" +
            "</head>" +
            "<body style='margin: 0px;'>" +
            "<div style='overflow: auto; border-bottom:1px solid black; background-color:#edf3fe;'>" +
            "<div style='margin: 1em auto 1em auto; width:350px; max-width:80%;'>" +
               "<svg style='border: 1px solid black; background-color: white; " +
                  "max-height:100%; max-width:100%;' " +
                  "xmlns='; " +
                  "text-rendering='optimizeLegibility'" +
                  "shape-rendering='geometricPrecision'" +
                  "preserveAspectRatio='xMidYMid'" +
                  "version='1.1' width='350' height='200'" +
                  "viewBox='0 0 700 400'>"+
                  "<circle cx='350' cy='200' r='150' fill='blue' />"+
               "</svg>" +
            "</div>" +
            "</div>" +
            "</body>" +
            primaryStage.setScene(new Scene(new StackPane(webView)));

         public static void main(String[] args) throws Exception {





            • Assignee:
              csmithjfx Charles Smith (Inactive)
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: