On Wed, 26 Mar 2025 08:44:28 GMT, Michael Strauß <mstra...@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