[TIMOB-10154] iOS : Events not getting fired for tabs in tab group
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2018-06-07T05:11:53.000+0000 |
Affected Version/s | Release 2.1.1, Release 3.1.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | api, qe-ios07 |
Reporter | Anshu Mittal |
Assignee | Unknown |
Created | 2012-07-26T03:04:02.000+0000 |
Updated | 2018-08-06T17:36:58.000+0000 |
Description
TabGroup click event is not fired.
This is not regression. This issue occurs from 2.0.1.
Steps to Reproduce:
1. Create an app using the code below.
2. Launch app. and click on TabGroup.
Expected Result:
TabGroup click event should be fired and should be reflected on the console.
Actual:
TabGroup click event is not fired.
Titanium.UI.setBackgroundColor('#000');
var tabGroup = Titanium.UI.createTabGroup();
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({
title:'Tab 1',
window:win1
});
var label1 = Titanium.UI.createLabel({
color:'#999',
text:'I am Window 1'
});
win1.add(label1);
var win2 = Titanium.UI.createWindow({
title:'Tab 2',
backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({
title:'Tab 2',
window:win2
});
var label2 = Titanium.UI.createLabel({
color:'#999',
text:'I am Window 2'
});
win2.add(label2);
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.open();
tabGroup.addEventListener("click", function(){
Ti.API.info("tabGroup click event fired!");
});
Attachments
File | Date | Size |
---|---|---|
app.js | 2018-05-03T15:09:18.000+0000 | 2995 |
Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
[~ewieber] can you please try and reproduce with GA components?
I am able to reproduce this issue using GA components, however it appears to be a known and addressed issue, based on the following chain of older tickets: TIMOB-6499, TIMOB-18099, TIMOB-19759. In short, this could be considered a non-issue. It may be worth having [~hknoechel] take a quick look at this issue to see if he feels more work can/should be done here, but other methods are provided in the previous tickets. I would recommend continuing to use the selected and unselected events for the tab or, better yet, using the focus and blur events of the tabgroup: https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TabGroup-event-focus Focus should be able to give them the previously active tab, currently active tab, and its index. If one of these events will not work for them, could they please provide the case where they do not and another event would be required?
Resolving this ticket as
Invalid
while agreeing with the previous comment from [~ewieber]. Tabs are not supposed to fireclick
,singletap
and other UI-related events, since they are no Ti.UI.View subclass. However, the docs should be updated to indicate that, so we should follow-up on that with a TIDOC ticket (cc [~bimmel]).Closing as invalid. If incorrect, please reopen.