{ "id": "130437", "key": "AC-1327", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2014-05-19T05:34:44.000+0000", "created": "2014-05-14T19:57:15.000+0000", "labels": [ "3.2.0GA", "ios" ], "versions": [], "issuelinks": [ { "id": "37695", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "125455", "key": "TIMOB-16318", "fields": { "summary": "TextField: Events - 'change' event does not get fired if you change TextField.value from a Button 'click' callback", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:37:44.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "If you manually set the value of a text field, the 'change' event is not fired.\r\n\r\nTestcase: \r\n\r\n{code:title=index.js|borderStyle=solid}\r\nvar txt = Ti.UI.createTextField({\r\n\tenabled: true,\r\n\thintText: 'change me'\r\n});\r\n\r\ntxt.addEventListener('change', function(e) {\r\n\tTi.API.info('text changed');\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n\tbottom: 0,\r\n\ttitle: 'Change Text'\r\n});\r\n\r\nbtn.addEventListener('click', function(e) {\r\n\ttxt.value = 'Yay, text changed!';\r\n});\r\n$.win.add(btn);\r\n$.win.add(txt);\r\n{code}\r\n\r\nWhen I change the text by focusing the textfield and typing the event is correctly fired, but if I click the button the event is never fired.\r\n\r\nThanks.", "attachment": [], "flagged": false, "summary": "Event 'change' not firing in textfield if setting value", "creator": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "3.2.2GA SDK, iOS 7.1", "comment": { "comments": [ { "id": "305107", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I ran your code and it was working as expected. I clicked the button \"Change Text\" and the event got fired.\r\n\r\nTest case\r\n{code}\r\nvar win=Ti.UI.createWindow({\r\n backgroundColor:'white'\r\n});\r\n \r\nvar txt = Ti.UI.createTextField({\r\n enabled: true,\r\n hintText: 'change me'\r\n});\r\n \r\ntxt.addEventListener('change', function(e) {\r\n Ti.API.info('text changed');\r\n});\r\n \r\nvar btn = Ti.UI.createButton({\r\n bottom: 0,\r\n title: 'Change Text'\r\n});\r\n \r\nbtn.addEventListener('click', function(e) {\r\n txt.value = 'Yay, text changed!';\r\n});\r\nwin.add(btn);\r\nwin.add(txt);\r\nwin.open();\r\n\r\n{code}", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-15T17:28:00.000+0000", "updated": "2014-05-15T17:28:00.000+0000" }, { "id": "305278", "author": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Did you run it on iOS 7.1, 3.2.2GA?\r\n\r\nI just re-tested it on the iOS simulator and it didnt work as expected, event is NOT fired for me.\r\n\r\nThe only different thing that I have from you is that mine is an alloy project, so my window is defined in a .xml file. Could this be an alloy problem?\r\n\r\nThanks.", "updateAuthor": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-16T14:14:26.000+0000", "updated": "2014-05-16T14:14:26.000+0000" }, { "id": "305447", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I can reproduce this issue but it appears to be an iOS behavior as we can reproduce this behavior with a native iOS application. Please see ticket TIMOB-16318 for more information.\r\n\r\nResolving this ticket as a duplicate of TIMOB-16318.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-19T05:34:26.000+0000", "updated": "2014-05-19T05:35:10.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }