{ "id": "87972", "key": "TIMOB-8018", "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": [], "resolution": { "id": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2020-01-09T21:41:30.000+0000", "created": "2012-03-14T15:30:06.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "parity", "reprod" ], "versions": [ { "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [ { "id": "35176", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "111188", "key": "TIMOB-13057", "fields": { "summary": "iOS: WebView: beforeload event fires twice (local file path)", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "15759", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "61295", "key": "TIMOB-663", "fields": { "summary": "App events from WebView are being fired multiple times", "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": "15764", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "87977", "key": "TIMOB-8021", "fields": { "summary": "Android: WebView: error event not fired when invalid url loaded", "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 } } } }, { "id": "15765", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "64002", "key": "TIMOB-3370", "fields": { "summary": "iOS: WebView: fires load event multiple times", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "15766", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "87967", "key": "TIMOB-8013", "fields": { "summary": "iOS: WebView: beforeload event fires twice if URL is valid", "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 } } } }, { "id": "15763", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "87978", "key": "TIMOB-8022", "fields": { "summary": "Android: WebView: load event is fired when an invalid url is loaded instead of an error event", "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": null, "updated": "2020-01-09T21:41:30.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": "When an invalid url is loaded from a webview, two beforeload events are fired (when one is expected).\r\n\r\nA valid url results in one beforeload event, as expected.\r\n\r\niOS has the correct behavior (beforeload is loaded once if an invalid url is loaded).\r\n\r\nSteps to Reproduce:\r\n\r\n1. Run code, click 'Open Invalid URL'.\r\n\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor:'blue'\r\n});\r\n\r\nvar buttonGoogle = Ti.UI.createButton({\r\n\ttitle:'Open Google',\r\n\ttop:'20%',\r\n\theight:'30%',\r\n\tleft:'10%',\r\n\tright:'10%'\r\n});\r\n\r\nbuttonGoogle.addEventListener('click', function(){\r\n\tvar webView = Ti.UI.createWebView({\r\n\t\t\turl:'http://www.google.com'\r\n\t\t});\r\n\t\r\n\twebView.addEventListener('load', function(){\r\n\t\talert('load: ' + webView.url);\r\n\t\t});\r\n\t\r\n\twebView.addEventListener('beforeload', function(){\r\n\t\talert('beforeload: ' + webView.url);\r\n\t\t});\r\n\t\t\r\n\twebView.addEventListener('error', function(){\r\n\t\talert('error: ' + webView.url);\r\n\t\t});\r\n\t\t\r\n\twin.add(webView);\r\n\t\r\n\tvar button = Ti.UI.createButton({\r\n\t\ttitle:'Close',\r\n\t\tright:0,\r\n\t\tbottom:0,\r\n\t\theight:'10%',\r\n\t\twidth:'20%'\r\n\t});\r\n\t\r\n\tbutton.addEventListener('click', function(){\r\n\t\twin.remove(webView);\r\n\t});\r\n\t\r\n\twebView.add(button);\r\n});\r\n\r\nwin.add(buttonGoogle);\r\n\r\nvar buttonInvalid = Ti.UI.createButton({\r\n\ttitle:'Open Invalid URL',\r\n\tbottom:'20%',\r\n\theight:'30%',\r\n\tleft:'10%',\r\n\tright:'10%'\r\n});\r\n\r\nbuttonInvalid.addEventListener('click', function(){\r\n\tvar webView = Ti.UI.createWebView({\r\n\t\t\turl:'http://xxx'\r\n\t\t});\r\n\t\r\n\twebView.addEventListener('load', function(){\r\n\t\talert('load: ' + webView.url);\r\n\t\t});\r\n\t\r\n\twebView.addEventListener('beforeload', function(){\r\n\t\talert('beforeload: ' + webView.url);\r\n\t\t});\r\n\t\t\r\n\twebView.addEventListener('error', function(){\r\n\t\talert('error: ' + webView.url);\r\n\t\t});\r\n\t\t\r\n\twin.add(webView);\r\n\t\r\n\tvar button = Ti.UI.createButton({\r\n\t\ttitle:'Close',\r\n\t\tright:0,\r\n\t\tbottom:0,\r\n\t\theight:'10%',\r\n\t\twidth:'20%'\r\n\t});\r\n\t\r\n\tbutton.addEventListener('click', function(){\r\n\t\twin.remove(webView);\r\n\t});\r\n\t\r\n\twebView.add(button);\r\n});\r\n\r\nwin.add(buttonInvalid);\r\n\r\nwin.open();\r\n{code}\r\n\r\nExpected Result:\r\n\r\nOne beforeload event should fire, with alerts.\r\n\r\nActual Result:\r\n\r\nTwo beforeload events fire.", "attachment": [], "flagged": false, "summary": "Android: WebView: beforeload event fires twice if url is invalid", "creator": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK: 1.8.2 githash=59b3a90s, 2.0.0.v20120314120250\r\nAndroid: V8, Rhino\r\nStudio: 2.0.0.201203121914\r\nOS: Snow Leopard\r\nDevices Tested: GSlate 3.1, Galaxy Nexus 4.0.2", "comment": { "comments": [ { "id": "240683", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The problem reproduce with release 3.0.2 and master release 3.1.0\r\n\r\ntested on\r\n\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0 \r\nTitanium SDK version: 3.0.2 \r\nDevice: Samsung galaxy s duos Android version: 4.0.4\r\nAndroid Emulator: Android SDK version: 2.2\r\n", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-05T10:30:00.000+0000", "updated": "2013-03-05T10:31:04.000+0000" }, { "id": "293341", "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:59.000+0000", "updated": "2014-02-15T22:30:23.000+0000" }, { "id": "293345", "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:30.000+0000", "updated": "2014-02-15T22:32:30.000+0000" }, { "id": "293355", "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:44:50.000+0000", "updated": "2014-02-16T05:46:18.000+0000" }, { "id": "299477", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Issue is reproducible using the following environment.\n\nTested on:\nDevice : Google Nexus 5, Android Version: 4.4.2\nSDK: 3.2.3.v20140328110916\nCLI version : 3.2.3-alpha2\nOS : MAC OSX 10.9.2\nAlloy: 1.3.1\nACS: 1.0.14\nnpm:1.3.2\nAppcelerator Studio, build: 3.2.3.201403271839\ntitanium-code-processor: 1.1.1-alpha\nXCode : 5.1 ", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-04-01T11:12:08.000+0000", "updated": "2014-04-01T11:12:08.000+0000" }, { "id": "422966", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am able to reproduce this issue with the following environment;\r\nPixel (7.1)\r\nStudio 4.9.0.201705302345\r\nTi SDK 6.1.1.v20170623141152\r\nAppc NPM 4.2.9\r\nAppc CLI 6.2.1\r\nTi CLI 5.0.13\r\nAlloy 1.9.11\r\nArrow 2.0.0\r\nXcode 8.2 (8C38)\r\nNode v4.8.2\r\nJava 1.8.0_131", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-27T18:28:04.000+0000", "updated": "2017-06-27T18:28:04.000+0000" }, { "id": "453602", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It has been decided that this issue should be closed as “Won’t do.” This issue is out of date with our current supported SDK release (7.5.2.GA as of the date of closure), and out of date with mobile OS versions. \r\n\r\nIf community members feel that the issue is still valid, please create a new ticket. Please reference this closed ticket number, include SDK used, comments, and code that demonstrates/reproduces the issue.", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-09T21:41:30.000+0000", "updated": "2020-01-09T21:41:30.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }