On Tue, 23 Jun 2026 15:58:07 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:
> 
>   Removed Application.setUserAgentStylesheet

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

> 146:     public void promptTextIsVisibleWhenEmptyFocusedTextInput(Class<? 
> extends TextInputControl> type)
> 147:             throws Exception {
> 148:         String userAgentStylesheet = 
> Application.getUserAgentStylesheet();

If we are not setting the stylesheet, the lines L148 and L171 are not necessary 
and should be removed, right?

Stepping back, I think there are a couple of pre-existing issues with this test 
in general, something that we might want to address in a follow-up:

1. the test name contains Modena yet it does not set `modena.css` explicitly.  
Once/if the default stylesheet changes, we'll have to rename the test, right?
2. we may run the newly added test with `caspian.css` as well, just to make 
sure. Strictly speaking, the bug says we don't have this problem with caspian, 
but there is a value in having this test as a regression test.  So we may want 
to consider extracting this test into a separate class, one that iterates over 
supported stylesheets.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2184#discussion_r3461290821

Reply via email to