{ "id": "70634", "key": "TIMOB-5531", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-06-07T05:20:15.000+0000", "created": "2011-06-07T04:58:37.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "mnegadaylov", "key": "mnegadaylov", "displayName": "Maxim Negadaylov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T20:32:21.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "goBack method closes the working window if there is no pages in the webView history. Also the window will close after using goBack method if webView contains the first page of the history of the webView.\r\n{code:JavaScript}\r\nvar win = Ti.UI.currentWindow;\r\n\r\nvar tf = Ti.UI.createTextField({\r\n\tleft: 10,\r\n\ttop: 5,\r\n\twidth: 320,\r\n\theight: 40\r\n});\r\n\r\nvar webView = Ti.UI.createWebView({\r\n\ttop: 50,\r\n\tleft: 10,\r\n\twidth: 250,\r\n\theight: 300,\r\n//\turl: 'google.com/404',\r\n\tbackgroundColor: '#AAD',\r\n\tloading: false,\r\n\ttouchEnabled: false,\r\n\t\r\n});\r\n\r\nvar but = Ti.UI.createButton({\r\n\tleft: 400,\r\n\ttop: 10,\r\n\ttitle: 'canGoBack',\r\n\twidth: 200,\r\n\theight: 50\r\n});\r\n\r\nvar but2 = Ti.UI.createButton({\r\n\tleft: 400,\r\n\ttop: 70,\r\n\ttitle: 'goBack',\r\n\twidth: 200,\r\n\theight: 50\r\n});\r\n\r\nwin.add(but2);\r\n//win.add(but);\r\nwin.add(tf);\r\nwin.add(webView);\r\n\r\ntf.addEventListener('return',function(){\r\n\twebView.url = tf.value;\r\n\t});\r\nbut2.addEventListener('click', function(){\r\n\twebView.goBack();\r\n});\r\n{code}", "attachment": [], "flagged": false, "summary": "MobileWeb: goBack method closes window if there is no pages in the webView history", "creator": { "name": "mvasko", "key": "mvasko", "displayName": "Misha Vasko", "active": true, "timeZone": "Europe/Kiev" }, "subtasks": [], "reporter": { "name": "mvasko", "key": "mvasko", "displayName": "Misha Vasko", "active": true, "timeZone": "Europe/Kiev" }, "environment": null, "comment": { "comments": [ { "id": "410446", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T20:32:21.000+0000", "updated": "2017-03-09T20:32:21.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }