{ "id": "155128", "key": "TIMOB-20488", "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": "2016-12-28T14:41:12.000+0000", "created": "2016-02-25T12:09:30.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "ios", "onback", "window" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-08-06T17:57:47.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": "The Window.onBack property seems not to work on iOS. \r\n\r\nI attach a simple alloy project in which I demonstrate the issue. If you look at the _new_window_ controller, you can find _$.win.onBack = onBack;_ (_onBack_ to be a function). However, _onBack_ isn't raised on back. I also tried by assigning the property to the navigation window instead, but with no results.", "attachment": [ { "id": "58330", "filename": "issue.onback.zip", "author": { "name": "balanza", "key": "balanza", "displayName": "emanuele de cupis", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-02-25T12:09:18.000+0000", "size": 8918132, "mimeType": "application/zip" } ], "flagged": false, "summary": "Docs: Ti.UI.Window.onBack is Android/Mobile-Web only", "creator": { "name": "balanza", "key": "balanza", "displayName": "emanuele de cupis", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "balanza", "key": "balanza", "displayName": "emanuele de cupis", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Titanium SDK 5.1.2.GA\r\nxcode 7.2.1\r\niOS 9.x", "comment": { "comments": [ { "id": "378227", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~sdarda] Can you try using classic? I'm curious if the issue is that the callback has to be defined during creation. for e.g.:\r\n{code}\r\nvar win3 = Ti.UI.createWindow({\r\n onBack: function() {...}\r\n}\r\n{code}\r\n", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-03-01T04:24:28.000+0000", "updated": "2016-03-01T04:24:42.000+0000" }, { "id": "396094", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "There is no \"onBack\" event on both iOS and Android. However, Android has {{[androidback|http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Window-event-androidback]}} which is a platform-specific event. In addition, the event-listeners need to be in the XML and referenced in the JS. Just for the future.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-14T08:17:47.000+0000", "updated": "2016-09-14T08:17:47.000+0000" }, { "id": "396331", "author": { "name": "balanza", "key": "balanza", "displayName": "emanuele de cupis", "active": true, "timeZone": "Europe/Berlin" }, "body": "What about this: [http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Window-property-onBack] ", "updateAuthor": { "name": "balanza", "key": "balanza", "displayName": "emanuele de cupis", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-16T13:07:22.000+0000", "updated": "2016-09-16T13:07:22.000+0000" }, { "id": "396337", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey [~balanza], never noticed that property, sorry. Reopening the ticket, we will take a look!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-16T14:03:53.000+0000", "updated": "2016-09-16T14:03:53.000+0000" }, { "id": "396341", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Ok so here is what happens: The property was never used for iOS or Mobileweb, it is Android-only. The property was undocumented for a long time and was documented last june. But because the {{platforms: [android]}} key was missing in the docs, the generator thought it would be available on all platforms. And since the fact that the property is only for the (physical hardware) button on Android-devices, it doesn't make sense on other platforms. See [here|https://github.com/appcelerator/titanium_mobile/commit/b14b37b9ae8dceb378c4a423ac8478baa3656a21#diff-235b09746f8440f0b12241286a59b2faR598] for the related commit. \r\n\r\nIf you want to execute actions after click the back (software) button, you can do that using the {{close}} event of a {{Ti.UI.Window}}.\r\n \r\nPR to adjust the docs: https://github.com/appcelerator/titanium_mobile/pull/8387", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-16T14:42:31.000+0000", "updated": "2016-09-16T14:45:36.000+0000" }, { "id": "396354", "author": { "name": "bimmel-defective", "key": "bimmel", "displayName": "(deactived) Brian Immel", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~hans123], the yaml file change looks good but the Jenkins build has failed. Will merge once we have a successful build.", "updateAuthor": { "name": "bimmel-defective", "key": "bimmel", "displayName": "(deactived) Brian Immel", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-16T16:16:47.000+0000", "updated": "2016-09-16T16:16:47.000+0000" }, { "id": "440464", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cleaning up older fixed tickets from 2016 and earlier. If this ticket should not have been closed, please reopen it.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:57:47.000+0000", "updated": "2018-08-06T17:57:47.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }