{ "id": "153492", "key": "TIMOB-20157", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-01-04T10:11:58.000+0000", "created": "2015-11-30T10:53:46.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-5.4.0", "tabgroup" ], "versions": [], "issuelinks": [], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-06-09T22:10:13.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": "Sometimes you may need to capture the `selected` event on a TabGroup too when the tab is already selected.\r\n\r\nFor example, in the Facebook iOS app, if you click on the Newsfeed button, and the Newsfeed tab is already selected, the ScrollView scrolls to top.\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/7512", "attachment": [], "flagged": false, "summary": "iOS: Support for `selected` event on TabGroup when tab already selected", "creator": { "name": "kopiro", "key": "kopiro", "displayName": "Flavio De Stefano", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "kopiro", "key": "kopiro", "displayName": "Flavio De Stefano", "active": true, "timeZone": "Europe/Rome" }, "environment": null, "closedSprints": [ { "id": 555, "state": "closed", "name": "2016 Sprint 1 SDK", "startDate": "2016-01-02T01:31:50.127Z", "endDate": "2016-01-16T01:31:00.000Z", "completeDate": "2016-01-18T00:52:43.848Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "373710", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR merged, thank you [~kopiro]! We go back to the \"focus\" Event in 5.2.0, but the behavior is the same.\r\n\r\nThis test case is for the QE to test the issue. Click on the \"Tab 2\" and watch the output. Click on the current tab again and watch the output.\r\n\r\nBefore: One log shown\r\nNow: Two logs shown, because the \"focus\" event also fires, when the tab is already selected.\r\n\r\n{code:javascript}\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\nvar win1 = Titanium.UI.createWindow();\r\nvar tab1 = Titanium.UI.createTab({window:win1, title: \"Tab 1\"});\r\n\r\nvar win2 = Titanium.UI.createWindow();\r\nvar tab2 = Titanium.UI.createTab({window:win2, title: \"Tab 2\"});\r\n\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\n\r\ntabGroup.addEventListener(\"focus\", function(e) {\r\n\tTi.API.warn(\"Tab with index \" + e.index + \" was focused!\");\r\n});\r\n\r\ntabGroup.open();\r\n\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-01-04T10:05:19.000+0000", "updated": "2016-01-04T10:11:51.000+0000" }, { "id": "387979", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, subsequent clicks on a tab group will return focus events to the console.\r\n\r\nTested On:\r\niPhone 6S (9.3.2) Device\r\nMac OSX El Capitan 10.11.5 \r\nTi SDK: 5.4.0.v20160608165242\r\nAppc Studio: 4.6.0.201605180604\r\nAppc NPM: 4.2.7.-2\r\nApp CLI: 5.4.0-11\r\nXcode 7.3\r\nNode v4.2.6\r\n*Closing ticket.*", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-06-09T22:09:10.000+0000", "updated": "2016-06-09T22:09:41.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }