{ "id": "87150", "key": "TIMOB-7849", "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": "12097", "description": "", "name": "Sprint 2012-05", "archived": true, "released": true, "releaseDate": "2012-03-11" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-03-06T11:30:27.000+0000", "created": "2012-02-29T03:36:58.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "module_webview", "qe-testadded" ], "versions": [ { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [ { "id": "15528", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "63210", "key": "TIMOB-2578", "fields": { "summary": "iOS: WebView event beforeLoad.url property", "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": "Trivial", "id": "5" }, "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": "2013-11-25T08:50:59.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": "When beforeload event called in TiUIWebView.m the URL is unknown. The beforeload event should be moved to shouldStartLoadWithRequest, to let beforeload know what url will be opened.\r\n\r\nA suggested fix can be found here:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/538", "attachment": [], "flagged": false, "summary": "iOS: TiUIWebView beforeload event doesn't have the URL ", "creator": { "name": "taracque", "key": "taracque", "displayName": "Taracque", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "taracque", "key": "taracque", "displayName": "Taracque", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS", "comment": { "comments": [ { "id": "184754", "author": { "name": "taracque", "key": "taracque", "displayName": "Taracque", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I don't think it's a New feature. As the documentation clearly describes, that the URL is passed on beforeload event, I still think this is a bug.\r\nhttp://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.WebView.beforeload-event.html", "updateAuthor": { "name": "taracque", "key": "taracque", "displayName": "Taracque", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-01T02:22:15.000+0000", "updated": "2012-03-01T02:22:15.000+0000" }, { "id": "184961", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue is simply pending functional review on Taracque's existing PR here:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/538", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-02T21:02:05.000+0000", "updated": "2012-03-02T21:02:05.000+0000" }, { "id": "185174", "author": { "name": "taracque", "key": "taracque", "displayName": "Taracque", "active": true, "timeZone": "America/Los_Angeles" }, "body": "You can test this issue with this code:\r\n\r\n\r\nvar webViewer = Titanium.UI.createWebView({\r\n\ttop:0,\r\n\tleft:0,\r\n\twidth:'100%',\r\n\theight:'100%'\r\n});\r\n\r\nwebViewer.addEventListener('beforeload',function(e){\r\n\talert(\"BEFORELOAD: \" + e.url);\r\n});\r\n\r\nwebViewer.addEventListener('load', function(e){\r\n\talert(\"LOAD: \" + e.url);\r\n});\r\n\r\nvar winFront = Titanium.UI.createWindow({\r\n title:'TUiWebView',\r\n\tnavBarHidden: true,\r\n backgroundColor:'#d6d6d6'\r\n});\r\n\r\nwinFront.add(webViewer);\r\nwinFront.open();\r\n\r\nwebViewer.url=\"http://www.appcelerator.com/\";\r\n\r\n\r\n\r\nYou will see, that beforeload alerts are displays the current url every time (which always can be read from webViewer.url property) , and load alert displays the new url.\r\nIf you accept my patch, beforload handler can reject page before it actually loads depending on URL. The current implementation has no sense.", "updateAuthor": { "name": "taracque", "key": "taracque", "displayName": "Taracque", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-06T10:24:52.000+0000", "updated": "2012-03-06T10:24:52.000+0000" }, { "id": "185363", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing issue\r\n\r\nTested with Ti Studio build 1.0.9.201202141208\r\nTi Mob SDK 2.0.0.v20120307090205\r\nOSX Lion 10.7.3\r\niPhone 4S OS 5.0\r\n\r\nExpected behavior is shown", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-07T10:13:37.000+0000", "updated": "2012-03-07T10:13:37.000+0000" }, { "id": "281118", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Anvil test case added.\nPR link:\nhttps://github.com/appcelerator/titanium_mobile/pull/5020", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-25T08:50:59.000+0000", "updated": "2013-11-25T08:50:59.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }