JDK-8088681 : Underscore not visible in HTML combo box options inside webview
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8u25,9,10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-12-17
  • Updated: 2017-07-10
  • Resolved: 2017-04-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 8 JDK 9
10Fixed 8u152Fixed 9.0.4Fixed
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) {

	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.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();
		Scene root = new Scene(sp);

Changeset URL - http://hg.openjdk.java.net/openjfx/10-dev/rt/rev/f3b23fa71794


I note that the webrev was generated in a clone of 9-dev/rt. You must take extra care that the fix is not pushed there. It must be pushed instead to 10-dev/rt. Fix looks fine to me. +1

Webrev: http://cr.openjdk.java.net/~asrivastava/dipak/8088681/webrev.00/ I have tested the fix on Win64 and Linux 64. I have run Junit test cases and DRT.

I can confirm this. Adding Jonathan, since this might be related to mnemonics in ComboBox itself.