Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8266639

Webview - contenteditable - problem with ENTER

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: openjfx16
    • Fix Version/s: None
    • Component/s: javafx
    • Subcomponent:
      web
    • CPU:
      x86_64
    • OS:
      generic

      Description

      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


        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: