{ "id": "106881", "key": "TIMOB-12139", "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": [ { "id": "15400", "description": "2013 Sprint 08 API", "name": "2013 Sprint 08 API", "archived": true, "released": true, "releaseDate": "2013-04-22" }, { "id": "15106", "description": "2013 Sprint 08", "name": "2013 Sprint 08", "archived": true, "released": true, "releaseDate": "2013-04-22" }, { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-04-09T22:05:02.000+0000", "created": "2012-12-20T19:48:06.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "exalture", "qe-testadded", "regression" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "29241", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "115327", "key": "TIMOB-14081", "fields": { "summary": "Android: app crashes when trying to paste more than maxLength characters in text field", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "28817", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "113464", "key": "TIMOB-13721", "fields": { "summary": "Android: TextField fires change event on first initialization (SDK 3.2)", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-10-04T10:44:04.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": "h3. Issue\r\n\r\nThe textfield change event listener in 2.1.4 is fired differently from 3.0.0.GA SDK.\r\n\r\nh3. Steps to Reproduce\r\n\r\nRun the sample below:\r\n\r\n{code}\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : 'white'\r\n});\r\n\r\nwin.open();\r\n\r\nvar view = Ti.UI.createView({\r\n backgroundColor : 'red',\r\n top : 20,\r\n left : 20,\r\n height : 400,\r\n width : 300,\r\n layout: 'vertical'\r\n});\r\n\r\nwin.add(view);\r\n\r\nvar textfield = Ti.UI.createTextField({\r\n left: 20,\r\n right: 20,\r\n height: 40,\r\n //maxLength: 6,\r\n borderColor: 'black',\r\n borderWidth: 2,\r\n value: 'Hello'\r\n});\r\nview.add(textfield);\r\n\r\nvar countChangeEvents = 0;\r\ntextfield.addEventListener('change', function(_evt){\r\n countChangeEvents++;\r\n Ti.API.info('change event fired: ' + countChangeEvents);\r\n var value = _evt.source.value; \r\n if (value == 'HelloA'){\r\n Ti.API.info('replace');\r\n textfield.value = value.replace('Hello', '*****');\r\n }\r\n});\r\n\r\n{code}\r\n\r\n2. Enter the letter \"A\" at the end of the text in the textfield.\r\n\r\n3. Notice the characters before A turn to \"*\".\r\n\r\n4. If you look at the logs the API info statements show 2 change events fired for the above steps in 3.0.0.GA while in 2.1.4.GA, 3 events were fired.\r\n\r\n\r\nIs this an intentional behavior?", "attachment": [], "flagged": false, "summary": "Android: Textfield change event behaves differently in 2.1.4 and 3.0.0 SDK", "creator": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium SDK: 3.0.0.GA\r\nPlatform OS: Android 4.0.3", "comment": { "comments": [ { "id": "242024", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with:\r\nTitanium Studio, build: 3.0.3.201302201202\r\nTitanium SDK, build: 3.1.0.v20130312161655\r\nDevice:\r\nNexus7 Android version: 4.2\r\n\r\nTest steps:\r\n1. Ran App and added \"A\" in the end of the text\r\nconsole output is: \r\nI/TiAPI(2913): change event fired: 1\r\n I/TiAPI(2913): replace\r\n W/IInputConnectionWrapper(2913): endBatchEdit on inactive InputConnection\r\n2. Each click on the keyboard's key fires event\r\n I/TiAPI(2913): change event fired: 2\r\n I/TiAPI(2913): change event fired: 3\r\n I/TiAPI(2913): change event fired: 4\r\n I/TiAPI(2913): change event fired: 5\r\n\r\nIdentical result for 3.0.2.GA", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-13T17:44:01.000+0000", "updated": "2013-03-13T17:46:53.000+0000" }, { "id": "245620", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/4072\r\nFor FR:\r\n1. Run the above test case.\r\n2. Add \"A\" at the end of the text. Check the log, it should fire three \"change\" events (before the fix, it only fired one \"change\" event).\r\n3. Uncomment Line 22 in the above test case {quote}maxLength: 6{quote} and then run the test case again.\r\n4. Input more characters in the text field. It should not crash (before the fix, it crashed on 4.x devices if the total characters > 6). Check the log, the \"change\" event should be fired when the shown text is changed.\r\n5. Please also follow the test instruction in TIMOB-5810.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-04T00:41:35.000+0000", "updated": "2013-04-05T21:11:07.000+0000" }, { "id": "248620", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "3_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/4193", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-22T17:27:44.000+0000", "updated": "2013-04-22T17:27:44.000+0000" }, { "id": "250504", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with: \r\nSDK:3.1.1.v20130503173050\r\nAppcelerator Studio: 3.1.1.201305031846\r\nOS: OSX 10.7.5\r\nDevice: Google nexus7(v 4.1)\r\n\r\nLogs change event successfully every time a character is added or deleted from textfield.", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-07T06:42:35.000+0000", "updated": "2013-05-07T06:42:35.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }