{ "id": "63715", "key": "TIMOB-3083", "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": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "11253", "name": "Sprint 2011-18", "archived": true, "released": true, "releaseDate": "2011-05-09" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-05-10T20:17:25.000+0000", "created": "2011-04-15T03:36:29.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "release-1.6.1", "release-1.7.0", "reported-1.5.1", "rplist" ], "versions": [], "issuelinks": [ { "id": "10395", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "65095", "key": "TIMOB-3934", "fields": { "summary": "Confirm TIMOB 3083 - Android: setTimeout won't fire in heavyweight window's own JS context (i.e., new activity+ url) the first time", "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": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } } ], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-05-13T10:17:33.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": "{html}

Titanium 1.6.0 2fab4fc209, Android 2.2 (with Google APIs)\nemulator. The problem below also does not work in 1.5.1, so I guess\nit's not really a regression. Didn't try anything older than\nthat.

\n

If you put a setTimeout in a heavyweight window\nwith its own js context (i.e., with a url), it won't fire the very\nfirst time you go to the window. If you back out and go back in\nagain, it will.

\n

app.js:

\n
\nTitanium.UI.setBackgroundColor('#000');\nvar win = Titanium.UI.createWindow({  \n    title:'Test',\n    backgroundColor:'#000',\n    exitOnClose: true,\n    url: 'win.js',\n    fullscreen:false  // makes it heavyweight\n});\nwin.open();\n
\n

win.js:

\n
\nsetTimeout(function(){Ti.API.info('Timeout firing');},3000);\n
\n

Do the following:

\n
{html}", "attachment": [], "flagged": false, "summary": "Android: setTimeout won't fire in heavyweight window's own JS context (i.e., new activity+ url) the first time", "creator": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "130030", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

Maybe this only happens when the heavyweight window is the first\nwindow showing in the app. Haven't tested.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:36:29.000+0000", "updated": "2011-04-15T03:36:29.000+0000" }, { "id": "130031", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

There is a helpdesk\nticket that has also encounter this problem. The code provided\nis very similar to the one above. I changed the \"fullscreen\"\nproperty from false to true, and it makes no difference. On Ti. SDK\n1.5.1 it works as expected.

\n

Tested with Ti. SDK 1.6.1
\nAndroid Emulator APIs 2.2 Screen HVGA

{html}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:36:29.000+0000", "updated": "2011-04-15T03:36:29.000+0000" }, { "id": "130032", "author": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Note ticket #3184 which may be related.

{html}", "updateAuthor": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:36:29.000+0000", "updated": "2011-04-15T03:36:29.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }