RFR: 8296653: ComboBox promptText is not displayed when the value is reset [v3]
Marius Hanl
mhanl at openjdk.org
Sat Nov 29 00:51:00 UTC 2025
On Fri, 28 Nov 2025 15:50:23 GMT, Ziad El Midaoui <zelmidaoui at openjdk.org> wrote:
>> The issue occurred because the skin marks the button cell as “empty” when the value becomes null.
>> With the fix clearing the ComboBox value re-shows the prompt text.
>> Tested using the code present in the bug.
>
> Ziad El Midaoui has updated the pull request incrementally with one additional commit since the last revision:
>
> Fixed test
Looks good to me.
Note for other reviewers: I suspect that the need for the combination of:
buttonCell.updateIndex(-1);
boolean empty = updateDisplayText(buttonCell, value, false);
this fix
and
the `comboBox.getValue() == null` check is [JDK-8127575](https://bugs.openjdk.org/browse/JDK-8127575) and [JDK-8221722](https://bugs.openjdk.org/browse/JDK-8221722).
So the code dependencies look a bit weird, but this fix and especially the test makes sense.
-------------
Marked as reviewed by mhanl (Committer).
PR Review: https://git.openjdk.org/jfx/pull/1989#pullrequestreview-3520254224
More information about the openjfx-dev
mailing list