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

Android: Set textfield value by coding will make cursor to the beginning of textfield

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 7.0.0, Release 7.0.1
    • Fix Version/s: Release 7.1.0
    • Component/s: Android
    • Environment:

      SDK 6.3.0 - 7.0.1
      Android 6.0 and 7.0

      Description

      Reproduce:

      1. Add following code to app.js in a class project.

      var win = Ti.UI.createWindow({});
       
      var tf = Ti.UI.createTextField({ 
      	top: 50,  
      	right: 20, 
      	left: 20, 
      }); 
       
      var btnchange = Ti.UI.createButton({ 
      	title: "change" 
      }); 
       
      btnchange.addEventListener('click', function() { 
      	tf.value = 'text'; 
      }); 
       
      win.add(tf); 
      win.add(btnchange); 
      win.open();
      

      2. Run the code to Android Emulator or device.
      3. Click change button, you will see the problem

      Note

      1.Tested on SDK 6.3.0, 7.0.1and 7.0.0. Same issue.
      2.Happens to Android only
      3.TextArea component has same issue as well.

      If it is possible, please provide a workaround before we fix.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jquick Joshua Quick
                Reporter:
                sliang Shuo Liang
                Reviewer:
                Joshua Quick
                Tester:
                Josh Longton
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code