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

iOS: textfield getValue() returns the misspelled text under iOS8

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: iOS
    • Environment:

      Titanium SDK version: 3.4.0 GA & 3.4.1 GA
      Platform & version: & iOS 8.1 & iOS 8.1.1
      Device Details: iPhone 5 and 5S
      Host Operating System: OS X 10.9 & OS X 10.10
      Titanium Studio version: 3.4.0.201409261227

    • Story Points:
      8
    • Sprint:
      2015 Sprint 18 SDK

      Description

      Problem description

      The textfield function "getValue()" returns the wrong (old) value, if the autocorrection replace the misspelled word.

      Steps to reproduce

      1. Click into the textfield
      2. Enter a misspelled word like "asdjflkjsd"
      3. Click into the textfield as soon as the autocorrection appears
      4. Click the button to alert the wrong misspelled textfield value again

      Test case

      app.js

      (function() {
       
      	var win = Ti.UI.createWindow({backgroundColor:'#ffffff'});
       
      	var view = Ti.UI.createView({layout:'vertical'});
      	
      	var button = Ti.UI.createButton({title:' Read textfield value ',top:20,borderRadius:5,borderColor:'#1C1C1C',backgroundColor:'#C0C0C0'});
      	
      	var textfield = Ti.UI.createTextField({
      		borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
      		autocapitalization: Titanium.UI.TEXT_AUTOCAPITALIZATION_NONE,
              top: 70,
              height: 30,
              width:Titanium.UI.FILL
         });
      	
         var label = Ti.UI.createLabel({left:20,top:20,width:Titanium.UI.FILL,font:{fontSize:12},
         text:'PROBLEM DESCRIPTION\n'
         +'The textfield function "getValue()" returns the wrong (old)value, if the autocorrection replace the misspelled word\n\n'
         +'STEPT TO REPRODUCE\n'
         +'1. Click into the textfield\n'
         +'2. Enter a misspelled word like "asdjflkjsd"\n'
         +'3. Click into the textfield as soon as the autocorrection appears\n'
         +'4. Click the button to alert the wrong misspelled textfield value again.\n\n'
         +'ENVIRONMENT\n'
         +'Ti Mobile SDK: 3.4.0 GA, Ti Studio: 3.4.0.201409261227, iOS: 8.1 & 8.1.1, Device: iPhone 5 and 5S'});	
      	
      	button.addEventListener('click',function(e){
      		alert(textfield.getValue());
      	});
      	
      	textfield.addEventListener('click',function(e){
      		if(textfield.getValue() !== ''){
      			alert(textfield.getValue());
      		}
      	});
      	
      	view.add(textfield);
      	view.add(button);
      	view.add(label);
      	win.add(view);
       
        	win.open();
      })();
      
      

        Attachments

          Activity

            People

            • Assignee:
              hknoechel Hans Knöchel
              Reporter:
              Esche Markus Eschenbach
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code