Hi Mirco,


Yes..Issue is present in JDK 10 (verified  with  JDK 10+46).


I tested with JDK 11 and issue is not reproducible.





From: Mirco <mirch...@gmail.com> 
Sent: Sunday, April 15, 2018 8:41 PM
To: Murali Billa <murali.bi...@oracle.com>
Cc: openjfx-dev@openjdk.java.net
Subject: Re: WebView: in jfx9 the ENTER key from keyboard does not add new 
lines on textareas (but works correctly on jfx8)


Just as additional information, I noticed that  currently in jfx10 the problem 
is still present.






On Sun, Apr 15, 2018 at 4:58 PM, Mirco <HYPERLINK 
"mailto:mirch...@gmail.com"mirch...@gmail.com> wrote:

Hi Murali,

thank you for the quick answer. 

Glad to hear the problem does not show up anymore with the latest build. 

I will check out again when in the future the official openjfx 11 binaries will 
be released.





On Sat, Apr 14, 2018 at 7:22 PM, Murali Billa <HYPERLINK 
"mailto:murali.bi...@oracle.com"murali.bi...@oracle.com> wrote:

Hi Mirco,

I tried the below sample code with JDK9+180 in Ubuntu and able to reproduce 
this issue.

I tried with latest JDK build in Ubuntu (and in windows too) and not able to 
reproduce this issue (i can see new lines are being added upon entering ENTER 

I suggest you can verify  with latest JDK build.


-----Original Message-----
From: Mirco <HYPERLINK "mailto:mirch...@gmail.com"mirch...@gmail.com> 
Sent: Saturday, April 14, 2018 10:16 PM
To: HYPERLINK "mailto:openjfx-dev@openjdk.java.net"openjfx-dev@openjdk.java.net
Subject: WebView: in jfx9 the ENTER key from keyboard does not add new lines on 
textareas (but works correctly on jfx8)

please forgive me if this is not the appropriate place for such kind of reports.
I've encountered what seems a regression from jfx8, at least on "Ubuntu 16.04".
As stated in the mail object the ENTER key produces no effects inside any 
editable components of a webpage.
Note: the CTRL-M works instead.

What follows is a very simple example to illustrate the issue:

import javafx.application.Application;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
import javafx.scene.layout.VBox;
import javafx.scene.input.KeyEvent;

public class WebViewSample extends Application {
    private Scene scene;

    @Override public void start(Stage stage) {
        stage.setTitle("Web View");
WebView editor = new WebView();
WebEngine engine = editor.getEngine();
engine.loadContent("<textarea rows=25 cols=25>Type content 
here...</textarea>"); editor.setContextMenuEnabled(false);
editor.addEventFilter(KeyEvent.KEY_PRESSED, (KeyEvent evt) -> { 
System.out.println(evt.getCode()); });
        VBox root = new VBox();
        scene = new Scene(root,750,500);

    public static void main(String[] args){
        launch(WebViewSample.class, args);

As you can see the ENTER event is intercepted and printed out by the filter but 
no newline is added.
This problem should not be confused with an old bug related to the JFXPanel 
(here no swing is involved).
I have not tried with the latest builds of openjfx so just in case you are 
aware of that and/or the problem is already resolved please ignore this email.

Kind regards,




Reply via email to