Webview - contenteditable - problem with ENTER

XMLWordPrintable

    • web
    • x86_64
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      I have tested it only on Linux (x64).

      A DESCRIPTION OF THE PROBLEM :
      When `contenteitable` attribute on html node is set to "true", we cannot create new line in such document.
      There is no problem with this in "regular" browsers.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run attached code... wait for WebView window and try to add new line inside list section (should create new item on list) or outside of this (should add new line).

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      When ENTER is pressed in contenteditable mode, new line (list item or paragraph) should be created.
      ACTUAL -
      There is no a new line - nothing changes.

      ---------- BEGIN SOURCE ----------
      package my.test;

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

      public class WebView1 extends Application {

          public static void main(String[] args) {
              Application.launch(args);
          }

          @Override
          public void start(Stage primaryStage) throws Exception {

              WebView webView = new WebView();
              WebEngine engine = webView.getEngine();

              engine.loadContent("<html><body contenteditable=\"true\"><ul><li>try press ENTER here</li><li>or here</li></ul> ... or here</body></html>");

              BorderPane layout = new BorderPane();
              layout.setCenter(webView);

              Scene s = new Scene(layout);
              primaryStage.setScene(s);
              primaryStage.show();
          }
      }

      ---------- END SOURCE ----------

      FREQUENCY : always


        1. WebView1.java
          0.8 kB
          Praveen Narayanaswamy
        2. Capture.PNG
          12 kB
          Praveen Narayanaswamy

            Assignee:
            Praveen Narayanaswamy
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: