Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11214

prompt() defaultText on Android sets placeholder text instead of default text

    XMLWordPrintableJSON

    Details

      Description

      On Android, a string passed for the defaultText parameter to prompt() is instead used as the placeholder text (i.e. the text shown when the box is empty). This behaviour is inconsistent with other platforms and incorrect compared to the documentation.

      The offending code (from line 282):

      {{
      public synchronized void prompt(final String message, final String title, final JSONArray buttonLabels, final String defaultText, final CallbackContext callbackContext)

      { ... promptInput.setHint(defaultText); }}

      Instead of EditText.setHint(), EditText.setText() should be called with the default text.

        Attachments

          Activity

            People

            • Assignee:
              Nikita Matrosov Nikita Matrosov
              Reporter:
              carmstrong Chris Armstrong
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: