Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8093444 | 8u60 | Anton Nashatyrev | P3 | Resolved | Fixed |
If you create a simple webview and display any web page in it scrolling to the right or left will cause the rendering to be corrupt.
Use a touch device and pan around or use your middle mouse button on the desktop and make sure you can make the scrollbar go left and right. On a touch device this makes the Webview unusable for pages that are wider than the view.
Example code to replicate this:
<code>
package sample;
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class Demo extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Parent root = new BorderPane();
primaryStage.setTitle("WebView Test");
primaryStage.setScene(new Scene(root, 500, 500));
BorderPane borderPane = (BorderPane) root;
final WebView webView = new WebView();
borderPane.setCenter(webView);
webView.getEngine().load("https://www.google.co.uk/search?q=test");
primaryStage.show();
webView.getEngine().setJavaScriptEnabled(true);
}
public static void main(String[] args) {
launch(args);
}
}
</code>
Use a touch device and pan around or use your middle mouse button on the desktop and make sure you can make the scrollbar go left and right. On a touch device this makes the Webview unusable for pages that are wider than the view.
Example code to replicate this:
<code>
package sample;
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class Demo extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Parent root = new BorderPane();
primaryStage.setTitle("WebView Test");
primaryStage.setScene(new Scene(root, 500, 500));
BorderPane borderPane = (BorderPane) root;
final WebView webView = new WebView();
borderPane.setCenter(webView);
webView.getEngine().load("https://www.google.co.uk/search?q=test");
primaryStage.show();
webView.getEngine().setJavaScriptEnabled(true);
}
public static void main(String[] args) {
launch(args);
}
}
</code>
- backported by
-
JDK-8093444 WebView horizontal scrolling using mouse or touch device causes rendering artifacts
-
- Resolved
-
- duplicates
-
JDK-8096945 WebView diagonal scrolling does not repaint correctly
-
- Closed
-