I am using a PopOver that contains a TextField and it is displayed when the user clicks on the imageView of a CustomTextField. When I click inside the internal TextField, everything goes well until I insert an accented vowel, which to my surprise is picked up by the external TextField instead of the internal one.
I show images of what happens, when popover.show(imageView)
When the popover is displayed from a button there is no problem popover.show(button)
I do not know, it seems to be a bug. If anyone has any idea why this happens, I would appreciate any help. Thanks
EDIT: Here I reproduce an example of code in which the effect that I comment is produced, when you introduce a vowel with a tilde in internal textfield, it does not appear in the internal one, but in the external one.
public class PopOverTest extends Application {
@Override
public void start(Stage primaryStage) {
CustomTextField externo = new CustomTextField();
ImageView imgView = new ImageView(new Image("test/image.png"));
externo.setLeft(imgView);
CustomTextField interno = new CustomTextField();
PopOver popOver = new PopOver();
popOver.setContentNode(interno);
imgView.setOnMouseClicked(e -> {
popOver.show(imgView);
});
StackPane root = new StackPane();
root.getChildren().add(externo);
Scene scene = new Scene(root, 300, 250);
primaryStage.setTitle("Hello World!");
primaryStage.setScene(scene);
primaryStage.show();
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
launch(args);
}
}