2

I have a simple application that uses a WebView in full-screen mode. In Mac OS X the blinking caret doesn't appear when you select a text box as well as the highlight to let you know what text input you are currently in. The selection is valid and you can type into the input field, but it's pretty tough to know where you are in a form. If I press ESC to leave full-screen mode the caret and highlights finally show up.

The issue only exists in OS X as I have tested this on a Windows machine. I'm running under Mountain Lion (10.8.5) with JRE 1.7.0_51. I even have some simple code below to recreate it. Click in the Google search box to see what I'm talking about. Has anybody encountered this issue and possibly fixed it? Or is this potentially some bug that may be fixed in FX 8? Thanks for your time!

package application;

import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;


public class Main extends Application {
    @Override
    public void start(Stage primaryStage) {
        try {
            WebView webView = new WebView();

            final WebEngine engine = webView.getEngine();
            engine.load("http://www.google.com");

            Scene scene = new Scene(webView, 1024, 768);
            primaryStage.setScene(scene);
            primaryStage.setFullScreen(true);           

            primaryStage.show();
        } catch(Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        launch(args);
    }
}
lennit
  • 141
  • 7
  • If you want to find if it is fixed in Java 8, then install [Java 8](https://jdk8.java.net/download.html) and test your application with it. – jewelsea Jan 22 '14 at 23:12
  • Well, I tried Java 8 and the issue still exists. I just wonder if there's a style that can be set or something else to fix the text box focus and caret. – lennit Jan 24 '14 at 04:41
  • Have you tried 3rd party embedded browsers? like https://code.google.com/p/chromiumembedded/ from http://stackoverflow.com/questions/7244653/getting-chrome-browser-in-java-applications – RGAT Sep 02 '14 at 06:48

0 Answers0