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

Android: Event 'change' only fired when user interacts (since of 3.0.0)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Cannot Reproduce
    • Affects Version/s: Release 3.0.0, Release 3.0.2
    • Fix Version/s: 2013 Sprint 07
    • Component/s: Android
    • Labels:
    • Environment:

      Android 4.1.1
      Titanium SDK 3.0.0, 3.0.2

      Description

      As of 3.0.0 event 'change' is only fired when the user interacts directly and not when other parts of the program changes a value.
      Try running the following code in 3.0.0 and 2.1.4 and you will notice the difference.

      app.js

       
      Titanium.UI.setBackgroundColor('#000');
       
      var tabGroup = Titanium.UI.createTabGroup();
       
       
      var win1 = Titanium.UI.createWindow({  
          title:'Tab 1',
          backgroundColor:'#fff'
      });
      var tab1 = Titanium.UI.createTab({  
          icon:'KS_nav_views.png',
          title:'Tab 1',
          window:win1
      });
       
      var textField = Ti.UI.createTextField({
      	color:'#000',
      	top:10,
      	width:400,
      	height:'auto'
      });
       
      win1.add(textField);
       
      textField.addEventListener('change',function(e){
      	alert("I've changed!");
      });
       
       
      var button = Titanium.UI.createButton({
         title: 'Push me!',
         width: 100,
         height: 50
      });
       
      button.addEventListener('click',function(e)
      {
         textField.value = "1234";
      });
       
      win1.add(button);
       
       
      tabGroup.addTab(tab1);  
       
      tabGroup.open();
      
      

        Attachments

          Activity

            People

            • Assignee:
              hpham Hieu Pham
              Reporter:
              mathiasi Mathias Immerkær
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration