{ "id": "66113", "key": "TIMOB-4538", "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": "12095", "description": "", "name": "Sprint 2012-03", "archived": true, "released": true, "releaseDate": "2012-02-12" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" }, { "id": "13170", "name": "Sprint 2012-06", "archived": true, "released": true, "releaseDate": "2012-03-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-03-29T01:00:34.000+0000", "created": "2011-06-03T23:22:53.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "module_webview", "parity", "qe-3.2.1", "qe-testadded", "webview" ], "versions": [], "issuelinks": [ { "id": "14780", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "62174", "key": "TIMOB-1542", "fields": { "summary": "iOS: 'pause' and 'resume' events don't seem to fire correctly", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "15133", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "62174", "key": "TIMOB-1542", "fields": { "summary": "iOS: 'pause' and 'resume' events don't seem to fire correctly", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-03-29T01:00:39.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": "first try:\r\n\r\nx.js\r\n{code}\r\nTi.UI.createWebView({ url:'y.html' });\r\n{code}\r\n\r\ny.html:\r\n{code}\r\nTi.App.addEventListener('pause', function() { Ti.API.log('you won't see this message'); });\r\n{code}\r\n\r\nupon pausing the app, the handler does not get invoked. i then tried another alternative:\r\n\r\nx.js\r\n{code}\r\nTi.UI.createWebView({ url:'y.html' });\r\nTi.App.addEventListener('pause', function() { Ti.API.log('ok, fire'); Ti.App.fireEvent('app.pause'); });\r\n{code}\r\n\r\ny.html:\r\n{code}\r\nTi.App.addEventListener('app.pause', function() { Ti.API.log('you won't see this message either'); });\r\n{code}\r\n\r\nthis time the pause event gets caught, 'app.pause' gets fired, but still the webview stays silent. somehow this leads me to the conclusion that webviews won't receive events after an app entered the 'pause' state, because other event handlers work just fine while the app is in running mode.\r\n\r\nA complete usecase supplied by Rick Blalock:\r\n\r\n{code:lang=javascript}\r\nvar webview = Ti.UI.createWebView({\r\n url: \"test.html\"\r\n})\r\n\r\nvar win = Ti.UI.createWindow();\r\n\r\nwin.add(webview);\r\nwin.open();\r\n\r\nTi.App.addEventListener(\"pause\", function() {\r\n Ti.API.info(\"Pause event received\");\r\n Ti.App.fireEvent(\"appPaused\");\r\n});\r\n\r\nTi.App.addEventListener(\"appPaused\", function() {\r\n Ti.API.info(\"App.js received appPaused event\");\r\n});\r\n{code}\r\n\r\n{code:lang=html}\r\n\r\n
\r\n