On Mon, 8 Jun 2026 19:18:16 GMT, Ziad El Midaoui <[email protected]> wrote:

>> This fixes a `TextInputControl` styling issue where prompt text is hidden 
>> when an empty text input control receives focus.
>> The fix removes the focused-state override `-fx-prompt-text-fill: 
>> transparent;` so focused empty text inputs continue to use the normal Modena 
>> prompt text fill.
>> The prompt text now stay visible when a text input control is focused.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Ziad El Midaoui has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Minor change to parameters

modules/javafx.controls/src/test/java/test/com/sun/javafx/scene/control/skin/modena/TextInputControlModenaTest.java
 line 165:

> 163:             control.requestFocus();
> 164:             Toolkit.getToolkit().firePulse();
> 165:             control.applyCss();

is this necessary?  it should work without `applyCss()`, I think.

modules/javafx.controls/src/test/java/test/com/sun/javafx/scene/control/skin/modena/TextInputControlModenaTest.java
 line 179:

> 177:     }
> 178: 
> 179:     private static Text getPromptNode(TextInputControl control) {

I wonder if we should move it to the `TextInputSkinShim` instead, something 
like this:

    public static Text getPromptNode(TextInputControl c) {
var skin = c.getSkin();
if(skin instanceof TextFieldSkin skin) {
        return skin.getPromptNode();
    } else if(skin instanceof TextAreaSkin skin) {
        return skin.getPromptNode();
    }
...


it will impact other tests, but probably cleaner long term.

modules/javafx.controls/src/test/java/test/com/sun/javafx/scene/control/skin/modena/TextInputControlModenaTest.java
 line 186:

> 184:         return TextInputSkinShim.getPromptNode((TextField) control);
> 185:     }
> 186: 

minor: extra newline

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2184#discussion_r3375739234
PR Review Comment: https://git.openjdk.org/jfx/pull/2184#discussion_r3375776989
PR Review Comment: https://git.openjdk.org/jfx/pull/2184#discussion_r3375734884

Reply via email to