{ "id": "63555", "key": "TIMOB-2923", "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": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-05-21T10:00:17.000+0000", "created": "2011-04-15T03:33:01.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "parity", "qe-port" ], "versions": [ { "id": "11233", "name": "Release 1.6.0", "archived": true, "released": true, "releaseDate": "2011-02-23" } ], "issuelinks": [], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-08-28T10:50:29.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

Problem

\r\n

When opening a window and focusing a text field, the events that\r\nfire are very inconsistent across Android and iOS. One way they are\r\ninconsistent is that Android will bubble events out, while iOS does\r\nnot.

\r\n

For example... you open a window, and click in a text field.

\r\n

On iOS, the events fire in this order: window focus, textfield\r\nfocus.

\r\n

On Android, the events fire in this order: textfield focus,\r\nwindow focus, textfield click, window click.

\r\n

Expected Behavior

\r\n

Events should be consistent across the platforms. Perhaps it\r\ncould be optional to turn on event bubbling on iOS, and it could be\r\nmade optional by default on Android as well.

\r\n

Tested On

\r\n

Titanium Mobile 1.6.0 1/19/11
\r\niPhone Simulator 4.2
\r\nAndroid Simulator 2.2

\r\n

Sample Code

\r\n

Attached. Follow the instructions in the Ti.UI.Label created by\r\nthe app, and look at the Ti Developer console to see when events\r\nare firing and if they are expected or not.

\r\n

In the iPhone simulator, my console showed the\r\nfollowing:

\r\n
\r\n[INFO] PASS: window-focus fired\r\n[ERROR] FAIL: Skipped expected textfield-click\r\n[INFO] PASS: textfield-focus fired\r\n
\r\n

Android showed the following:

\r\n
\r\n[ERROR] [2257,2269] FAIL: textfield-focus fired when expected window-focus\r\n[INFO] [4,2273] PASS: window-focus fired\r\n[INFO] [4,2741] PASS: textfield-click fired\r\n[ERROR] [29,2770] FAIL: window-click fired when expected textfield-focus\r\n
\r\n

Associated Helpdesk Ticket

\r\n

http://developer.appcelerator.com/helpdesk/view/67111

{html}", "attachment": [ { "id": "18244", "filename": "app.js", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-04-15T03:33:02.000+0000", "size": 2405, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "iOS: Events don't bubble like they do on Android", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "179345", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Reassigning to ios component, as it was incorrectly set.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-01-16T04:09:03.000+0000", "updated": "2012-01-16T04:09:03.000+0000" }, { "id": "194745", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Tested with 2.0.1GA2 and got the following result:\r\n\r\niOS simulator:\r\n[INFO] PASS: window-focus fired\r\n[ERROR] FAIL: Skipped expected textfield-click\r\n[INFO] PASS: textfield-focus fired\r\n\r\nSamsung Galaxy S2 (2.3.6):\r\nINFO/TiAPI(14291): PASS: window-focus fired\r\nERROR/TiAPI(14291): FAIL: Skipped expected textfield-click\r\nINFO/TiAPI(14291): PASS: textfield-focus fired\r\n\r\n\r\nI'm not sure if the 'expected textfield-click' should fail or not, therefore I haven't closed this ticket. Please review and take appropriate actions.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-05-14T15:38:40.000+0000", "updated": "2012-05-14T15:38:40.000+0000" }, { "id": "216460", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix with:\r\nTitanium Studio, build: 2.1.2.201208201549\r\nTitanium SDK: 2.1.2.v20120824144611\r\nDevices:\r\niPhone 4.3.5\r\nGalaxyS3 4.0.4\r\n\r\n", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-28T10:49:30.000+0000", "updated": "2012-08-28T10:49:30.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }