{ "id": "99017", "key": "TIMOB-10397", "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": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14126", "description": "Sprint 2012-19 Core", "name": "Sprint 2012-19 Core", "archived": true, "released": true, "releaseDate": "2012-09-24" }, { "id": "14271", "description": "2012 Sprint 19", "name": "2012 Sprint 19", "archived": true, "released": true, "releaseDate": "2012-09-24" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-14T08:07:02.000+0000", "created": "2012-08-10T12:39:35.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "module_webview", "qe-review", "qe-testadded" ], "versions": [ { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" } ], "issuelinks": [ { "id": "57743", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "173895", "key": "TIMOB-27253", "fields": { "summary": "[iOS] Titanium APIs are able to be used for remote webviews", "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": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-07-18T10:57:27.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": "Run the attached app.js and sample test.html file.\r\nThe Ti namespace does not work after webview reload.\r\nworks fine on ios.", "attachment": [ { "id": "30420", "filename": "app.js", "author": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-10T12:39:35.000+0000", "size": 845, "mimeType": "text/javascript" }, { "id": "30421", "filename": "test.html", "author": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-10T12:39:35.000+0000", "size": 98, "mimeType": "text/html" } ], "flagged": false, "summary": "Android: Ti namespace does not work in webview after reload", "creator": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Ti sdk 2.1.1 and Android 3.2 and 4.0", "comment": { "comments": [ { "id": "218949", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "More detailed testing instructions:\r\n\r\n{code}\r\nvar window = Ti.UI.createWindow({\r\n\tlayout : \"vertical\"\r\n});\r\n\r\nvar webview = Ti.UI.createWebView({\r\n\ttop : 0,\r\n\twidth : '100%',\r\n\theight : 100\r\n});\r\n\r\nvar loadButton = Ti.UI.createButton({\r\n\ttitle : \"load html\",\r\n\ttop : 50,\r\n\twidth : 200,\r\n\theight : 50\r\n});\r\n\r\nvar logButton = Ti.UI.createButton({\r\n\ttitle : \"Log Message\",\r\n\ttop : 50,\r\n\twidth : 200,\r\n\theight : 50\r\n});\r\n\r\nvar reloadButton = Ti.UI.createButton({\r\n\ttitle : \"reload webview\",\r\n\ttop : 50,\r\n\twidth : 200,\r\n\theight : 50\r\n});\r\n\r\nvar remoteButton = Ti.UI.createButton({\r\n\ttitle : \"remote load webview\",\r\n\ttop : 50,\r\n\twidth : 200,\r\n\theight : 50\r\n});\r\n\r\nremoteButton.addEventListener(\"click\", function() {\r\n\twebview.url = \"http://www.google.com\";\r\n\r\n});\r\n\r\nloadButton.addEventListener(\"click\", function() {\r\n\twebview.url = \"test.html\";\r\n\r\n});\r\n\r\nlogButton.addEventListener(\"click\", function() {\r\n\twebview.evalJS(\"Ti.API.info(\\\"-------------------------------hello\\\")\");\r\n\r\n});\r\n\r\nreloadButton.addEventListener(\"click\", function() {\r\n\twebview.reload();\r\n});\r\n\r\nwindow.add(webview);\r\nwindow.add(remoteButton);\r\nwindow.add(loadButton);\r\nwindow.add(logButton);\r\nwindow.add(reloadButton);\r\n\r\nwindow.open();\r\n{code}\r\n\r\n1. Add the app.js above (NOT the one attached to this ticket), and also add the 'test.html' attached. Both should be under the Resources directory.\r\n2. Run the app and click on load html ('test0' should load in the webview)\r\n3. Click on Log Message, and confirm that the hello message appears in logcat\r\n4. Click on reload webview\r\n5. Click on Log Message and confirm that the hello message appears in logcat\r\n\r\nActual Results:\r\nThe hello message does not appear after the reload\r\n\r\nActual Results:\r\nThe hello message appears after the reload\r\n\r\n\r\nNOTE: I have also added a 'remote load webview' button, which will load a remote URL. Clicking log message after loading a remote webview SHOULD NOT display the hello message. This is because we do not inject Titanium APIs for remote webviews.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-13T18:09:12.000+0000", "updated": "2012-09-13T18:09:12.000+0000" }, { "id": "224901", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified On:\r\nTitanium Studio: 3.0.0.201210220122\r\nTitanium SDK: 3.0.0.v20121024144610\r\nAndroid Device: Galaxy Duos(v2.3.6), Galaxy Tab(v3.2), Galaxy Nexus(v4.0.4)", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-25T09:28:38.000+0000", "updated": "2012-10-25T09:28:38.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }