{ "id": "111188", "key": "TIMOB-13057", "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": "15277", "description": "2013 Sprint 06 Core", "name": "2013 Sprint 06 Core", "archived": true, "released": true, "releaseDate": "2013-03-25" }, { "id": "14816", "description": "2013 Sprint 06", "name": "2013 Sprint 06", "archived": true, "released": true, "releaseDate": "2013-03-25" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-03-19T23:03:41.000+0000", "created": "2013-03-14T00:58:07.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam" ], "versions": [], "issuelinks": [ { "id": "35177", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "126466", "key": "TIDOC-1541", "fields": { "summary": "iOS: beforeload event fires twice if you call TiUIwebview.reload( ) and set URL", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "35176", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "87972", "key": "TIMOB-8018", "fields": { "summary": "Android: WebView: beforeload event fires twice if url is invalid", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-28T22:51:51.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": "h6.Issue\r\nWhen app bring up the webview on iOS, we can see one beforeload and one load event. After calling webview.reload(), it can be seen 2 beforeload and load events.\r\n\r\nh6.Steps to reproduce are as follows:\r\n1. start app \r\n2. notice 1x beforeload and 1x load events\r\n3. tap [reload] button\r\n4. notice 2x beforeload and 2x load events\r\n\r\nh6.load\r\n{code}\r\n[INFO] app.js: webview.beforeload: uuid: na, url: file:///Users/gary.fong/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/64CBE284-753E-47FC-BA3A-ED78C03BF2A2/AndroidWebViewReload2.app/test.html\r\n[INFO] test.html: window.load\r\n[INFO] test.html: dump: uuid: na, isReady: false\r\n[INFO] app.js: webview.load: uuid: na, url: file:///Users/gary.fong/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/64CBE284-753E-47FC-BA3A-ED78C03BF2A2/AndroidWebViewReload2.app/test.html\r\n{code}\r\n\r\nh6.reload\r\n{code}\r\n[INFO] app.js: resetting url\r\n[INFO] reloading...\r\n[INFO] app.js: webview.beforeload: uuid: na, url: file:///Users/gary.fong/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/64CBE284-753E-47FC-BA3A-ED78C03BF2A2/AndroidWebViewReload2.app/test.html\r\n[INFO] app.js: webview.beforeload: uuid: na, url: file:///Users/gary.fong/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/64CBE284-753E-47FC-BA3A-ED78C03BF2A2/AndroidWebViewReload2.app/test.html\r\n[INFO] test.html: window.load\r\n[INFO] test.html: dump: uuid: na, isReady: false\r\n[INFO] app.js: webview.load: uuid: na, url: file:///Users/gary.fong/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/64CBE284-753E-47FC-BA3A-ED78C03BF2A2/AndroidWebViewReload2.app/test.html\r\n{code}", "attachment": [ { "id": "36289", "filename": "app.js", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-03-14T00:58:07.000+0000", "size": 1257, "mimeType": "text/javascript" }, { "id": "36288", "filename": "test.html", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-03-14T00:58:07.000+0000", "size": 731, "mimeType": "text/html" } ], "flagged": false, "summary": "iOS: WebView: beforeload event fires twice (local file path)", "creator": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK: Mobile 3.0 & 3.1\r\nPlatform OS Version: iOS5 & iOS6", "comment": { "comments": [ { "id": "242147", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-03-14T00:59:07.000+0000", "updated": "2013-03-14T00:59:07.000+0000" }, { "id": "243060", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Provided example sets url and then calls reload(). Both generate 'beforeload' events.", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-19T23:03:41.000+0000", "updated": "2013-03-19T23:03:41.000+0000" }, { "id": "293340", "author": { "name": "yiluxiangbei", "key": "yiluxiangbei", "displayName": "Chunsheng Zhang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Why this bug still exists?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-15T16:22:24.000+0000", "updated": "2014-02-15T22:30:42.000+0000" }, { "id": "293346", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~yiluxiangbei] You may find you get better support on a free, open-source product if you remain professional. One of the bugs you commented on was invalid, the other is still open, but does not have many watchers. What is the exact problem you are experiencing? Do you have sample test code?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-15T22:32:44.000+0000", "updated": "2014-02-15T22:32:44.000+0000" }, { "id": "293356", "author": { "name": "yiluxiangbei", "key": "yiluxiangbei", "displayName": "Chunsheng Zhang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "hello,@Ingo Muschenetz.I'm sorry about the word.I use both method setUrl and reload.They triggered twice beforeload and once load.I use beforeload event to show activityIndicator and load event to get data from database.The code like this:\r\nNow I'm only use setUrl no reload method.It can work well.I sugguest you to describe it on the docs.\r\n\r\nwebview.addEventListener('beforeload', function(e) {\r\nlogger.info(\"beforeload\");\r\nactivityIndicator.show();\r\n});\r\n\r\nwebview.addEventListener('load', function(e) {\r\n//change content\r\n\r\nwebUtil = require('utils/webUtil');\r\nvar beginDate = new Date();\r\nlogger.info(\"---------------getContent start:\" + beginDate.getTime());\r\ncontent = webUtil.getContent(this);\r\nlogger.info(content);\r\nvar endDate = new Date();\r\nlogger.info(\"---------------getContent end:\" + endDate.getTime() + \" use time:\" + (endDate.getTime() - beginDate.getTime()));\r\n\r\nvar date = new Date();\r\nTi.App.fireEvent('app:changeContent', {\r\ntime: date.getTime(),\r\ntype: this.menu.type,\r\ncode: this.menu.code,\r\npageId: this.menu.pageId,\r\nnewsId: this.menu.newsId,\r\ncontent: content\r\n});\r\n\r\nlogger.info(\"load\");\r\nactivityIndicator.hide();\r\n});", "updateAuthor": { "name": "yiluxiangbei", "key": "yiluxiangbei", "displayName": "Chunsheng Zhang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-16T05:49:09.000+0000", "updated": "2014-02-16T05:49:09.000+0000" }, { "id": "293357", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-02-16T06:37:34.000+0000", "updated": "2014-02-16T06:37:34.000+0000" }, { "id": "416078", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-28T22:51:51.000+0000", "updated": "2017-03-28T22:51:51.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }