-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
9, 10
FULL PRODUCT VERSION :
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 10
A DESCRIPTION OF THE PROBLEM :
I'm having a problem displaying text in an HTMLEditor that is displayed in a JavaFX Dialog window.
OBJECTIVE: Display and edit text in an HTMLEditor that has been set to the content for the dialogPane in a Dialog window.
PROBLEM: The text in the HTMLEditor is invisible. It is there, but it cannot be seen.
CONCLUSION: The problem clearly has something to do with using HTMLEditor and Dialog together while running Java 9. I've used Dialog in the same way in other contexts without any problem, and the HTMLEditor in the demo app itself also functions properly. Also – and this is significant – the configuration described above (running HTMLEditor from a Dialog) runs fine under Java 8.
REGRESSION. Last worked in version 8u144
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See "Source code for executable test case" in this form.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The HTMLEditor in the Dialog would display text that was set to its htmlText value when the dialog was created and displayed.
ACTUAL -
The HTMLEditor in the dialog does not display text. The text is there, but it is not visible. For example, if the editor is clicked when the dialog is displayed (this is apparently necessary to activate the dialog) and text is entered from the keyboard, the entered text will be returned from the dialog to the app's HTMLEditor when the dialog closes. This proves that the problem is making the text visible, and not whether the text is actually entered.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Code for an app that illustrates the problem can be found at:
https://stackoverflow.com/questions/47532260/why-does-javafx-htmleditor-not-display-text-where-editor-is-displayed-in-a-dialo
SOME SHORT NOTES ON HOW THE DEMO APP WORKS:
Both buttons have the same onAction value (actionHandler in the app code). Clicking either button initializes the dialog and dialogEditor before the dialog is displayed. If "Button#1" is clicked the htmlText for dialogEditor is initialized with the htmlText from appHtmlEditor. Clicking Button#2 initializes the dialogEditor with the sampleText value (which appears below the buttons). If the dialog is closed by clicking 'OK' the htmlText value for dialogEditor is returned and set to the htmlText for appHtmlEditor.
PROBLEM REPLICATED:
Clicking Button#2 displays the dialog, ... but without the sampleText appearing, although the sampleText is there because if the dialog is closed immediately by clicking the 'OK' button the htmlText from dialogEditor (which - again - is invisible) is returned and set to the htmlText value for appHtmlEditor, which causes that htmlText to change.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
none, ... but would be grateful if you have something to share!
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 10
A DESCRIPTION OF THE PROBLEM :
I'm having a problem displaying text in an HTMLEditor that is displayed in a JavaFX Dialog window.
OBJECTIVE: Display and edit text in an HTMLEditor that has been set to the content for the dialogPane in a Dialog window.
PROBLEM: The text in the HTMLEditor is invisible. It is there, but it cannot be seen.
CONCLUSION: The problem clearly has something to do with using HTMLEditor and Dialog together while running Java 9. I've used Dialog in the same way in other contexts without any problem, and the HTMLEditor in the demo app itself also functions properly. Also – and this is significant – the configuration described above (running HTMLEditor from a Dialog) runs fine under Java 8.
REGRESSION. Last worked in version 8u144
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See "Source code for executable test case" in this form.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The HTMLEditor in the Dialog would display text that was set to its htmlText value when the dialog was created and displayed.
ACTUAL -
The HTMLEditor in the dialog does not display text. The text is there, but it is not visible. For example, if the editor is clicked when the dialog is displayed (this is apparently necessary to activate the dialog) and text is entered from the keyboard, the entered text will be returned from the dialog to the app's HTMLEditor when the dialog closes. This proves that the problem is making the text visible, and not whether the text is actually entered.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Code for an app that illustrates the problem can be found at:
https://stackoverflow.com/questions/47532260/why-does-javafx-htmleditor-not-display-text-where-editor-is-displayed-in-a-dialo
SOME SHORT NOTES ON HOW THE DEMO APP WORKS:
Both buttons have the same onAction value (actionHandler in the app code). Clicking either button initializes the dialog and dialogEditor before the dialog is displayed. If "Button#1" is clicked the htmlText for dialogEditor is initialized with the htmlText from appHtmlEditor. Clicking Button#2 initializes the dialogEditor with the sampleText value (which appears below the buttons). If the dialog is closed by clicking 'OK' the htmlText value for dialogEditor is returned and set to the htmlText for appHtmlEditor.
PROBLEM REPLICATED:
Clicking Button#2 displays the dialog, ... but without the sampleText appearing, although the sampleText is there because if the dialog is closed immediately by clicking the 'OK' button the htmlText from dialogEditor (which - again - is invisible) is returned and set to the htmlText value for appHtmlEditor, which causes that htmlText to change.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
none, ... but would be grateful if you have something to share!
- duplicates
-
JDK-8190349 Tooltip based on graphic contented only show less than 1 out of 10 times
- Resolved
- relates to
-
JDK-8190349 Tooltip based on graphic contented only show less than 1 out of 10 times
- Resolved