Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10154] iOS : Events not getting fired for tabs in tab group

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2018-06-07T05:11:53.000+0000
Affected Version/sRelease 2.1.1, Release 3.1.0
Fix Version/sn/a
ComponentsiOS
Labelsapi, qe-ios07
ReporterAnshu Mittal
AssigneeUnknown
Created2012-07-26T03:04:02.000+0000
Updated2018-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

FileDateSize
app.js2018-05-03T15:09:18.000+00002995

Comments

  1. Shameer Jan 2013-03-27

    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
  2. Abir Mukherjee 2018-05-23

    [~ewieber] can you please try and reproduce with GA components?
  3. Eric Wieber 2018-05-30

    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?
  4. Hans Knöchel 2018-06-07

    Resolving this ticket as Invalid while agreeing with the previous comment from [~ewieber]. Tabs are not supposed to fire click, 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]).
  5. Eric Merriman 2018-08-06

    Closing as invalid. If incorrect, please reopen.

JSON Source