Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26372

iOS: Assigning text value in change event causes duplicated input on TextView

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 7.3.1
    • Fix Version/s: Release 7.5.0
    • Component/s: iOS
    • Labels:
      None
    • Story Points:
      3
    • Sprint:
      2018 Sprint 19 SDK

      Description

      Steps to reproduce the behavior
      Add the following code to your app.js of a classic project:

      var win = Ti.UI.createWindow({
          backgroundColor: '#fff'
      });
      const textArea = Ti.UI.createTextArea({
      	backgroundColor: 'lightgray',
      	height: 100,
      	width: 200
      });
      textArea.addEventListener('change', (e) => {
      	// This will trigger an additional change event and duplicate input
      	textArea.value = e.value;
      });
      win.add(textArea);
      win.open();
      

      Actual behavior
      Any input will be duplicated in the TextView itself. For example pressing 'H' will result in 'HH' appearing in the TextView.

      Expected behavior
      The value of the text view can be assigned without any side effects.

      Additional notes
      This is required for the two-way binding in Vue.js. The iOS TextField does not have this issues, neither does any of the text widgets on Android.

        Attachments

          Activity

            People

            • Assignee:
              jvennemann Jan Vennemann
              Reporter:
              jvennemann Jan Vennemann
              Tester:
              Samir Mohammed
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-6571
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code