RFR: 8335547: Support multi-line prompt text for TextArea [v4]
Ziad El Midaoui
zelmidaoui at openjdk.org
Wed Mar 26 13:33:29 UTC 2025
On Wed, 26 Mar 2025 08:44:28 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> Ziad El Midaoui has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Removed unused imports and code
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/TextFieldSkin.java line 735:
>
>> 733: promptNode.fontProperty().bind(getSkinnable().fontProperty());
>> 734:
>> 735: promptNode.textProperty().bind(getSkinnable().promptTextProperty().map(s -> s.replace("\n", "")));
>
> I recommend to replace all usual newline characters with `replaceAll("[\r\n]", "")` as I can't think of a compelling reason to remove only some, but leave others in the string.
The tests show that only LF "\n" is rendered as a new line, there is no need to add more restrictions that is not needed
and the same was tested by @andy-goryachev-oracle previously in the comments and it confirms the same.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1716#discussion_r2014152180
More information about the openjfx-dev
mailing list