ADDITIONAL SYSTEM INFORMATION :
Mac OS 10.15 Catalina, OpenJDK, OpenJFX 13 and 14.
A DESCRIPTION OF THE PROBLEM :
Using JavaFX Webview via JFXPanel in Swing, the application freezes on the selection of the keyboard layout (input source) such as Japanese in Mac OSX. It works fine with other keyboard layouts such as US international.
REGRESSION : Last worked in version 8
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run the application.
2. Click or select anything on a webpage to freeze the application.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Continued functionality of the application.
ACTUAL -
The application hangs showing the throbber (Mac's spinning beach ball).
---------- BEGIN SOURCE ----------
import javafx.application.Platform;
import javafx.scene.Scene;
import javafx.scene.web.WebView;
import javafx.scene.web.WebEngine;
import javafx.embed.swing.JFXPanel;
import javafx.scene.layout.BorderPane;
import javax.swing.JFrame;
public class JavaFXBrowser {
JFXPanel jfxPanel;
public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
new JavaFXBrowser();
}
});
}
public JavaFXBrowser() {
jfxPanel = new JFXPanel();
// JavaFX thread
Platform.runLater(new Runnable() {
@Override
public void run() {
// Create the WebView
WebView webView = new WebView();
// Create the WebEngine
WebEngine webEngine = webView.getEngine();
webEngine.load("https://www.oracle.com/java/");
BorderPane pane = new BorderPane();
pane.setCenter(webView);
Scene scene = new Scene(pane);
jfxPanel.setScene(scene);
}
});
JFrame frame = new JFrame();
frame.add(jfxPanel);
frame.setTitle("WebView in JFXPanel");
frame.setSize(600, 400);
frame.setVisible(true);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
No known workaround
FREQUENCY : always