Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9848] iOS: Ti.UI.TextField 'change' event fired twice (once with wrong value)

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-09-28T19:42:10.000+0000
Affected Version/sRelease 2.0.2
Fix Version/sSprint 2012-15 API, Release 2.1.3, Release 3.0.0
ComponentsiOS
Labelsapi, community, module_textfield, parity, qe-testadded
ReporterMathias Extremo
AssigneeVishal Duggal
Created2012-06-28T09:59:48.000+0000
Updated2012-10-26T20:51:35.000+0000

Description

 

	var window = Ti.UI.createWindow({backgroundColor: 'white'});

window.open();


var txt1 = Ti.UI.createTextField({
    top: '10',
    left: '10',
    right:'10',
    height:'30',
    color:'#336699',
    borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
    value: ''
});

window.add(txt1);

txt1.addEventListener('change', function(e){
     
    Ti.API.log('change -- value : '+txt1.value+' (e.value :'+e.value+')');
    alert('change -- value : '+txt1.value+' (e.value :'+e.value+')');
     
});

1 - Write "abcd" Logs and alerts show : change -- value : a (e.value :a) change -- value : ab (e.value :ab) change -- value : abc (e.value :abc) change -- value : abcd (e.value :abcd) 2 - Put the cursor between "b" and "c" and press "x" Logs and alerts show : change -- value : abcdx (e.value :abcdx) change -- value : abxcd (e.value :abxcd)

Comments

  1. Vishal Duggal 2012-07-16

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/2577
  2. Neha Chhabra 2012-08-03

    Environment used for verification - Tested with Titanium SDK: 2.2.0.v20120801170113 Tested with Titanium  Studio: 2.1.1.201207271312 Device - Android Emulator 2.3.3,iPad Simulator (5.0), iPad 3 (5.1) Machine OS - MAC 10.7.3
  3. Satyam Sekhri 2012-08-23

    Occurs on: Titanium Studio: 2.1.2.201208201549 Titanium SDK: 2.1.2.v20120821160113 Device: iPad3 (v5.1) Fixed with SDK: 2.2.0.v20120801170113
  4. Sabil Rahim 2012-09-28

    Reopening issue to add Release2.1.3 tag
  5. Tamila Smolich 2012-09-28

    Closing as fixed. Verified on: Titanium Studio, build: 2.1.2.201208301612 Titanium SDK, build: 2.1.3.v20120928124610 Device: iPhone 4 (5.1.1), iPhone Simulator (6.0)

JSON Source