-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
jfx24
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
When WebView displays a html with multiline text, some extra character showed at the locations where text lines concatenate.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Works fine for JavaFX SDK 21.0.2.
ACTUAL -
Extra characters superimposed on letters A and Y, see screenshot below.
---------- BEGIN SOURCE ----------
Run the following code,
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.VBox;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class WebViewTest extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage arg0) throws Exception {
WebView webView = new WebView();
WebEngine webEngine = webView.getEngine();
webEngine.loadContent(HTML);
VBox vBox = new VBox();
vBox.getChildren().add(webView);
Scene scene = new Scene(vBox);
Stage stage = new Stage();
stage.setMaxHeight(150);
stage.setScene(scene);
stage.show();
}
private static String HTML = """
<html>
<head>
<style>
body {font-size: 20pt;}
</style>
</head>
<body>
<p>
Very short text.
Another short text.
Yet another short text.
</p>
</body>
</html>
""";
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Unknown
When WebView displays a html with multiline text, some extra character showed at the locations where text lines concatenate.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Works fine for JavaFX SDK 21.0.2.
ACTUAL -
Extra characters superimposed on letters A and Y, see screenshot below.
---------- BEGIN SOURCE ----------
Run the following code,
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.VBox;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class WebViewTest extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage arg0) throws Exception {
WebView webView = new WebView();
WebEngine webEngine = webView.getEngine();
webEngine.loadContent(HTML);
VBox vBox = new VBox();
vBox.getChildren().add(webView);
Scene scene = new Scene(vBox);
Stage stage = new Stage();
stage.setMaxHeight(150);
stage.setScene(scene);
stage.show();
}
private static String HTML = """
<html>
<head>
<style>
body {font-size: 20pt;}
</style>
</head>
<body>
<p>
Very short text.
Another short text.
Yet another short text.
</p>
</body>
</html>
""";
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Unknown