[TIMOB-20157] iOS: Support for `selected` event on TabGroup when tab already selected
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-01-04T10:11:58.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.4.0 |
Components | iOS |
Labels | qe-5.4.0, tabgroup |
Reporter | Flavio De Stefano |
Assignee | Chee Kiat Ng |
Created | 2015-11-30T10:53:46.000+0000 |
Updated | 2016-06-09T22:10:13.000+0000 |
Description
Sometimes you may need to capture the
selected
event on a TabGroup too when the tab is already selected.
For 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.
https://github.com/appcelerator/titanium_mobile/pull/7512
PR merged, thank you [~kopiro]! We go back to the "focus" Event in 5.2.0, but the behavior is the same. This 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. Before: One log shown Now: Two logs shown, because the "focus" event also fires, when the tab is already selected.
Verified as fixed, subsequent clicks on a tab group will return focus events to the console. Tested On: iPhone 6S (9.3.2) Device Mac OSX El Capitan 10.11.5 Ti SDK: 5.4.0.v20160608165242 Appc Studio: 4.6.0.201605180604 Appc NPM: 4.2.7.-2 App CLI: 5.4.0-11 Xcode 7.3 Node v4.2.6 *Closing ticket.*