Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12438] The value if Titanium.UI.Tab.active is incorrect after switching tabs

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionWon't Fix
Resolution Date2017-05-01T22:34:28.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsMobileWeb
Labelslinvalid
ReporterYaroslav Pidstryhach
AssigneeAlan Leard
Created2013-01-11T06:30:31.000+0000
Updated2018-08-02T22:20:05.000+0000

Description

Steps to reproduce: 1. Create a tab group with two tabs. 2. Programmatically set the "active" property to true, or call setActive(true), for the non-active tab (the second tab). 3. Check the "active" property of the tab. The first tab still returns true but should return false; the second tab returns false but should return true. Note: - Titanium.UI.Tab.active actually changed the tab (the other tab appeared). - There are no such problem after clicking on the tab manually. - Checking the properties asynchronously (after a timeout, in a callback) does not resolve the problem. Example:
var tabGroup = Titanium.UI.createTabGroup();

var redWindow = Titanium.UI.createWindow({ backgroundColor: "red"});
var firstTabInTG = Ti.UI.createTab({
    title: "Title-1",
    window: redWindow
});
tabGroup.addTab(firstTabInTG);

var greenWindow = Titanium.UI.createWindow({ backgroundColor: "green"});
var secondTabInTG = Ti.UI.createTab({
    title: "Title-2",
    window: greenWindow
});
tabGroup.addTab(secondTabInTG);

tabGroup.open();

secondTabInTG.active = true;
firstTabInTG.active; // true - should be false
secondTabInTG.active; // false - should be true

Comments

  1. Lee Morris 2017-05-01

    Resolving ticket as "Won't Fix" as MobileWeb is no longer supported.
  2. Eric Merriman 2018-08-02

    Closing old "Won't fix" tickets. If you disagree, please reopen.

JSON Source