{ "id": "87114", "key": "TIMOB-7842", "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": "12097", "description": "", "name": "Sprint 2012-05", "archived": true, "released": true, "releaseDate": "2012-03-11" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-03-02T19:13:43.000+0000", "created": "2012-02-28T13:27:29.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "module_textfield", "parity", "qe-testadded" ], "versions": [], "issuelinks": [ { "id": "15771", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "87982", "key": "TIMOB-8024", "fields": { "summary": "Android: TextArea: return event not fired", "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": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-03-14T17:03:06.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": "*Code*\r\n{code}\r\nvar win = Titanium.UI.createWindow({ \r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar textField = Ti.UI.createTextField({\r\n\tcolor: '#336699',\r\n height: 50,\r\n top: 100,\r\n left: 100,\r\n width: 250,\r\n returnKeyType: Ti.UI.RETURNKEY_SEARCH\r\n});\r\n\r\nvar counter = 0;\r\ntextField.addEventListener('return', function(e)\r\n{\r\n\tTi.API.info('This should only be printed once.');\r\n\t\r\n\twin.backgroundColor = (++counter % 2 == 0) ? 'red' : 'yellow';\r\n});\r\n\r\nwin.add(textField);\r\nwin.open();\r\n\r\n{code}\r\n\r\n*Expected result*\r\nWhen you tap on the textfield and then click on the return key, the event listener should only be fired once.\r\n\r\n*Actual result*\r\nWhen you do the above, the event gets fired twice. \r\n\r\n*Note*\r\n-I tried it with TiSDK 1.8.1 and the latest master from github, both seem to have this issue.\r\n-When you comment out the line 'returnKeyType: Ti.UI.RETURNKEY_SEARCH', it seems to work fine and the event is only fired once.\r\n-I only seem to be able to produce this issue with some devices. Issue happens on a Nexus One (2.3.6), Samsung Exhibit 4G (2.3.3) and Droid Bionic (2.3.4). I don't seem to be able to reproduce this issue on a Samsung Sensation 4G (2.3.3).", "attachment": [], "flagged": false, "summary": "Android: Ti.UI.TextField.return event gets fired twice", "creator": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "environment": "Titanium SDK version: 1.8.1 & 2.0.0.v20120228113140\r\nJavascript Engine: Rhino & V8 \r\nPlatform & version: Android 2.3.x\r\nDevice Details: Nexus One, Samsung Exhibit 4G, Droid Bionic\r\nHost Operating System: OSX 10.7.2\r\nTitanium Studio version: 1.0.8.201201262211", "comment": { "comments": [ { "id": "184945", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Also test in KS: Base UI -> Views -> Table Views -> Table View (Layout 2)\r\n- Tap the 'Next' button and the keyboard should hide itself.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-02T15:36:22.000+0000", "updated": "2012-03-02T15:36:22.000+0000" }, { "id": "185395", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as Fixed.\r\n\r\nSDK: 2.0.0.v20120307090205\r\nAndroid: V8, Rhino\r\nStudio: 1.0.9.201202141208\r\nOS: Snow Leopard\r\nDevices Tested: Nexus One 2.2.2, Droid3 2.3.4, Xoom 3.2.1", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-07T12:59:32.000+0000", "updated": "2012-03-07T12:59:32.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }