{ "id": "63273", "key": "TIMOB-2641", "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": "11251", "name": "Sprint 2011-16", "archived": true, "released": true, "releaseDate": "2011-04-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-05-11T14:54:50.000+0000", "created": "2011-04-15T03:25:36.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "fireevent", "ios", "klist", "webview" ], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-05-11T14:54:50.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}
I encounter some weird behavior and found there was a previous\nissue concerning WebView.url(newUrl).
\nWhen I call WebView.reload() after a screen rotation (else the\nWebView doesn't resize it's content) then the connection is\nbroken.
\nMore info about what happens:
\n function openDocument(docURL) {
\n
\n\n\n
\n
\n\n alert('webview click received // ' + docURL);\n Ti.App.fireEvent('customOpenDocument', {url:docURL});\n alert('webview click received CALL ENDED');\n};</code>
\n
\n\n\n\n\nThe first alert shows up. But I never receive the fired event, and\nthe 2nd alert doesn't show up. However I no reload() was previously\ncalled, then the event is received and the 2nd alert show.\n
\n
SDK 1.5.1 / iPad
fireEvent is lost after webview.reload(); is called. Event fires\nonce and and as soon as webview is reloaded event is los
\nTicket Reference and testing code: http://developer.appcelerator.com/helpdesk/view/72421
\nSimple Testing Code attached.
I'm confused here. You're calling reload(), which loads the page\nup as if it were completely fresh and new (Akin to hitting reload\non a web browser). By definition, the state of the web view will be\nlost because it's reloading.
The fact is that the listener doesn't (in application) does not\nreceive an event which is fired from a webview that have been\nreload.
\nIt has to re-register itself as a listener.
Let's investigate this further. There appears to be a\nworkaround, but perhaps we could do more for our customer.
Reggie: what is the workaround exactly?