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

Underscore not visible in HTML combo box options inside webview

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u25, 9, 10
    • Fix Version/s: 10
    • Component/s: javafx
    • Labels:
    • Subcomponent:
      web

      Backports

        Description

        Hi on embedding local html page into webview , we are unable to see underscore('_') when combo box options expande, on selecting particular option the value will be displayed properly.

        only first underscore not visible in the value.
        if multiple underscores present in the value only first one wont be visible.

        --------------------------------------------------------------------

        package com.sample;

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

        public class samplewebview extends Application {

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

        @Override
        public void start(Stage primaryStage) throws Exception {
        primaryStage.setTitle("WebView test");
        WebView browser = new WebView();
        WebEngine engine = browser.getEngine();
        //// Html content can be saved as html
        //String url = samplewebview.class.getResource("hello.html").toString();
        //engine.load(url);
        engine.loadContent("<!DOCTYPE html><html lang=\"en-US\"><head><meta charset=utf-8><title>DropDwon Example</title></head><body><div><p>Drop Down</p> <select> <option value=\"volvo\">Volvo_New_</option> <option value=\"volvo\">_Volvo_New_</option> <option value=\"mercedes\">_Mercedes_</option> <option value=\"audi\">_Audi_</option></select> </div></body></html>");
        StackPane sp = new StackPane();
        sp.getChildren().add(browser);
        Scene root = new Scene(sp);
        primaryStage.setScene(root);
        primaryStage.show();
        }

        }

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dkumar Dipak Kumar (Inactive)
                  Reporter:
                  chandubjfx chandub (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported: