Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8352564

Support multi-line prompt text for TextArea

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • jfx25
    • javafx
    • None
    • behavioral
    • minimal
    • No risk in these changes, other than allowing the textPrompt property to take any value and apply restrictions on the view rather than the controls.
    • Java API
    • JDK

      Summary

      Allow the promptText property in TextArea, TextField, and PasswordField to contain any character.

      Problem

      Previously, the promptText property had restrictions in some cases which limited the values it could take and modify its value by removing newlines "\n". Also binding the property when it has line breaks this would throw an exception which was handled in the TextInputControl control but this imposed unnecessary constraints.

      Solution

      Allow the promptText property to take any value. This provides more flexibility when using TextArea, TextField, and PasswordField controls. A promptText value that contains newlines will continue to appear in a single line in the single-line controls TextField and PasswordField and as a multi-line in TextArea.

      Specification

      The change is behavioral: previously, there were unspecified restrictions on the promptText value in certain cases. Now, these restrictions have been removed, and the property can accept any value.

            zelmidaoui Ziad El Midaoui
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: