{ "id": "112277", "key": "TIMOB-13409", "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": "15397", "description": "2013 Soprint 07 API", "name": "2013 Sprint 07 API", "archived": true, "released": true, "releaseDate": "2013-04-08" }, { "id": "15105", "description": "2013 Sprint 07", "name": "2013 Sprint 07", "archived": true, "released": true, "releaseDate": "2013-04-08" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2013-04-07T07:52:30.000+0000", "created": "2013-04-05T20:40:26.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "qe-3.1.0" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T22:59:02.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": "h5. Description:\r\nA report came in from the field regarding a runtime error generated when attempting to open a tab with Titanium.UI.currentTab.open(). The behavior is that calling open in this way does not open a tab, but opens a new heavyweight window. On that window, when trying to open another tab in the same manner, a runtime error is generated because Titanium.UI.currentTab is null since not in a tabgroup.\r\n\r\nPlease visit github.com/veamon/Tabs for code.\r\n\r\nh5. Steps to reproduce:\r\n1) Install project from github and launch\r\n2) Note you are in tab group. Click \"next\"\r\n3) Note you are not in tab group. Click \"next\"\r\n\r\nh5. Result:\r\nRuntime error.\r\n\r\nh5. Expected Result:\r\nIf comparing to iOS, expect to stay in tab group and instead of runtime error, a new tab is opened.", "attachment": [ { "id": "37085", "filename": "Screen Shot 2013-04-05 at 1.38.56 PM.png", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-05T20:40:26.000+0000", "size": 123775, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Titanium.UI.currentTab.open(); parity issue on Android", "creator": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OS 10.8.3\r\nCLI: 3.1.0-beta\r\nAppcelerator Studio, build: 3.1.0.201304022134\r\nTitanium SDK version 3.1.0.v20130404133052\r\nAndroid Emulator 4.2", "comment": { "comments": [ { "id": "246230", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This is a basic difference between the underlying OS.\n\nThe TabProxy comes with a built in Navigation Controller on iOS. So when you do a tab.open(window), we essentially push the window onto the NavController stack. So there is a direct UI relationship between the window and the tab. As such any window running its own context has a pointer to the tab and tabgroup.\n\nOn Android the TabProxy has no NaviController equivalent. So when you do a tab.open(window) we are essentially opening a heavyweight window over the tabGroup. As such there is no UI correlation between the window and the tab which made the call to open it. Hence the window running in its own context has no pointers to the tab or tabgroup.\n\nSo Ti.UI.currentTab will be null on android and will point to the hosting tab on iOS. ", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-07T07:52:23.000+0000", "updated": "2013-04-07T07:52:23.000+0000" }, { "id": "246360", "author": { "name": "joshlewis", "key": "joshlewis", "displayName": "Josh Lewis", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Vishal, that doesnt seem to make since though, since it works fine on the 2.x SDK's, and not the latter ones. Something must have changed in between to break that functionality, and its also not noted anywhere in Kitchensink, or anywhere else.", "updateAuthor": { "name": "joshlewis", "key": "joshlewis", "displayName": "Josh Lewis", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-08T03:37:02.000+0000", "updated": "2013-04-08T03:37:02.000+0000" }, { "id": "246370", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "A lot of things changed with 3.0.0 release wrt the TabGroup design on Android (Actionbar support).\n\nBut to get back to the point as to why currentTab is null, lets say you have tabbed application and open a bunch of windows on the first tab.\nThen you go ahead and switch the activeTab on the tabgroup in response to some user action on the open window.\nOn iOS there is an immediate visual feedback, since the window exists within the UI context of the tabGroup.\n\nOn Android you wouldn't see anything until you actually closed all the open windows and made the tabGroup visible to the user. \n\nThe tab.open(window) API exists purely for legacy reasons on Android. The opened window has no UI relationship with the tabGroup or tab. ", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-08T05:40:23.000+0000", "updated": "2013-04-08T05:40:23.000+0000" }, { "id": "252201", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "@Vishal: if that's the case update the KitchenSink as everything crashes becuase of this", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-05-15T21:56:09.000+0000", "updated": "2013-05-15T21:56:09.000+0000" }, { "id": "254161", "author": { "name": "joshlewis", "key": "joshlewis", "displayName": "Josh Lewis", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Martin Agreed. If nothing else, it shouldnt be hard to just build that extra functionality in to keep the default behavior in place, so we dont have to completely rewrite our apps, or create custom functions. Personally, I'm staying with 2.15 until I absolutely have to upgrade.", "updateAuthor": { "name": "joshlewis", "key": "joshlewis", "displayName": "Josh Lewis", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-28T02:03:31.000+0000", "updated": "2013-05-28T02:03:31.000+0000" }, { "id": "415185", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Won't Fix\".", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T22:59:02.000+0000", "updated": "2017-03-22T22:59:02.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }