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

font-family not updated in HTMLEditor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx13, 8u202
    • javafx
    • Reproduced on JDK 8u202, on Windows 10 and also on macOS High Sierra (version 10.13.6)

    • x86_64
    • windows_10

      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"

            shadzic Samir Hadzic
            shadzic Samir Hadzic
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: