Run this sample code:
"
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class LoadHtml extends Application {
public void start(Stage primaryStage) throws Exception {
primaryStage.setTitle(System.getProperty("java.runtime.version"));
WebView browser = new WebView();
WebEngine engine = browser.getEngine();
engine.loadContent("<div style=\"text-align: right; height:80%\">test</div>\n"
+ "<div style=\"text-align: right; height:80%\">test</div>");
StackPane sp = new StackPane();
sp.getChildren().add(browser);
Scene scene = new Scene(sp);
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
"
Actual Result:
You will see that the scrollBars are still overlapping the content.
Expect result:
Scrollbars should not overlap the content.
"
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class LoadHtml extends Application {
public void start(Stage primaryStage) throws Exception {
primaryStage.setTitle(System.getProperty("java.runtime.version"));
WebView browser = new WebView();
WebEngine engine = browser.getEngine();
engine.loadContent("<div style=\"text-align: right; height:80%\">test</div>\n"
+ "<div style=\"text-align: right; height:80%\">test</div>");
StackPane sp = new StackPane();
sp.getChildren().add(browser);
Scene scene = new Scene(sp);
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
"
Actual Result:
You will see that the scrollBars are still overlapping the content.
Expect result:
Scrollbars should not overlap the content.
- relates to
-
JDK-8245918 Scrollbars from web pages appear to be absolute, overlapping everything - redux
- Open
-
JDK-8215775 Scrollbars from web pages appear to be absolute, overlapping everything
- Resolved