{ "id": "171883", "key": "TIMOB-26183", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2018-07-09T22:19:18.000+0000", "created": "2018-07-05T10:13:48.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "20102", "name": "Release 7.1.1", "archived": false, "released": true, "releaseDate": "2018-05-02" } ], "issuelinks": [], "assignee": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "updated": "2018-07-09T22:19:18.000+0000", "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" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Issue Description:*\r\nTextfield *’change'* event does not get fired if you change TextField.value from a Button 'click' callback. If we manually change textfield value then the change event fires.\r\n\r\n*Test Environment:*\r\n{code}\r\nAppcelerator Command-Line Interface, version 7.0.4\r\nCopyright (c) 2014-2018, Appcelerator, Inc. All Rights Reserved.\r\n\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.13.5\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8.0GB\r\n\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\n\r\nAppcelerator CLI\r\n Installer = 4.2.13\r\n Core Package = 7.0.4\r\n\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\n node-appc Version = 0.2.44\r\nTI SDK 7.1.1.GA\r\nDevice details: Huawei Y9 2018 (android 8)\r\n{code}\r\n\r\n*Steps to reproduce:*\r\n\r\n1. Run the test code\r\n2. Click “Change text” button.\r\n3. Observe that the log does not show the change event\r\n4. Now try to change textfield value manually, observe the log and check that the change event fires successfully\r\n\r\n*Test code:*\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n \r\n});\r\nvar txt = Ti.UI.createTextField({\r\n\tenabled: true,\r\n\thintText: 'change me',\r\n\ttop: 10\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\r\nwin.add(txt);\r\nwin.add(btn);\r\nwin.open();\r\n{code}\r\n\r\n*Test Result:*\r\n\r\n*Console logs:*\r\n{code}\r\nINFO] text changed\r\n[INFO] text changed\r\n[INFO] text changed\r\n[INFO] text changed\r\n[INFO] text changed\r\n[WARN] InputMethodManager: startInputReason = 8\r\n[WARN] IInputConnectionWrapper: getExtractedText on inactive InputConnection\r\n[WARN] IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection\r\n[INFO] HwSecImmHelper: mSecurityInputMethodService is null\r\n[WARN] IInputConnectionWrapper: getExtractedText on inactive InputConnection\r\n[WARN] IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection\r\n[WARN] libEGL: EGLNativeWindowType 0x74aa060010 disconnect failed\r\n[INFO] APSAnalyticsService: Analytics Service Started\r\n[INFO] APSAnalyticsService: Stopping Analytics Service\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: TextField 'change' event does not get fired if we change TextField.value from a Button 'click’.", "creator": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "environment": null, "comment": { "comments": [ { "id": "439066", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is not a bug. This is the intended behavior.\r\nPlease see ticket: [TIMOB-17210]\r\n\r\nBefore Titanium 7.1.0, this was the behavior on Android, but not the behavior on iOS or Windows. The community expected Android to match iOS' behavior where changing a TextField/TextArea's text programmatically would NOT fire a \"change\" event. Android was modified to match this behavior in 7.1.0.\r\n\r\nIf your app requires the old behavior, then you can fire the \"change\" event manually from button \"click\" event handler as follows...\r\n{code:javascript}\r\ntextField.value = \"Hello World\";\r\ntextField.fireEvent(\"change\", {\r\n\tvalue: textField.value,\r\n});\r\n{code}\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-07-09T22:19:03.000+0000", "updated": "2018-07-09T22:19:03.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }