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

font-family not updated in HTMLEditor

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8u202, openjfx13
    • Fix Version/s: openjfx14
    • Component/s: javafx
    • Environment:

      Reproduced on JDK 8u202, on Windows 10 and also on macOS High Sierra (version 10.13.6)

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows_10

      Description

      In the HTMLEditor, when positioning the caret in a text, the toolbar is updated to reflect the current position (font-size, bold button etc). The font-family is not updated if the font-family is composed of several words.

      Steps to reproduce :
      - Run this sample :
      "

      import javafx.application.Application;
      import static javafx.application.Application.launch;
      import javafx.scene.Scene;
      import javafx.scene.web.HTMLEditor;
      import javafx.stage.Stage;

      public class TestApp extends Application {

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

          @Override
          public void start(Stage primaryStage) throws Exception {
              HTMLEditor editor = new HTMLEditor();
              
              Scene scene = new Scene(editor);
              primaryStage.setScene(scene);
              primaryStage.show();
          }
      }
      "

      - Write "Hello world"
      - Select the word "Hello" and apply the "Arial" font-family
      - Select the word "world" and apply the "Agency FB" font-family.
      - Click on the word "Hello" positioning the caret between the "e" and the "l"
      - Verify "Arial" is selected. Then click on the word "world" positioning the caret between the "o" and the "r"

      Actual behavior:
      - The font-family stays on "Arial".

      Expected behavior:
      - The font-family should be on "Agency FB"

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shadzic Samir Hadzic
                Reporter:
                shadzic Samir Hadzic
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: