Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Adobe Flex SDK 4.5 (Release)
-
None
-
None
-
Affected OS(s): Windows
Affected OS(s): Windows 7
Language Found: English
Description
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<s:layout>
<s:VerticalLayout/>
</s:layout>
<s:TabBar dataProvider="
"/>
<mx:ViewStack id="viewStack" width="100%" height="100%">
<s:NavigatorContent name="idx0" label="0">
<s:Label text="0"/>
<s:Button label="Close" y="25" click="viewStack.removeChild(viewStack.getChildByName('idx0'))"/>
</s:NavigatorContent>
<s:NavigatorContent name="idx1" label="1">
<s:Label text="1"/>
<s:Button label="Close" y="25" click="viewStack.removeChild(viewStack.getChildByName('idx1'))"/>
</s:NavigatorContent>
<s:NavigatorContent name="idx2" label="2">
<s:Label text="2"/>
<s:Button label="Close" y="25" click="viewStack.removeChild(viewStack.getChildByName('idx2'))"/>
</s:NavigatorContent>
<s:NavigatorContent name="idx3" label="3">
<s:Label text="3"/>
<s:Button label="Close" y="25" click="viewStack.removeChild(viewStack.getChildByName('idx3'))"/>
</s:NavigatorContent>
<s:NavigatorContent name="idx4" label="4">
<s:Label text="4"/>
<s:Button label="Close" y="25" click="viewStack.removeChild(viewStack.getChildByName('idx4'))"/>
</s:NavigatorContent>
</mx:ViewStack>
</s:WindowedApplication>
In my code above, when I select a tab and click "Close", I'm expecting either the next (+1) or previous (-1) tab to become selected. However this is what's happening:
Tabs: 0, 1, 2, 3, 4
Close tab 4, tab 3 is selected but viewstack is blank
Tabs: 0, 1, 2, 3
Close tab 3, tab 0 is selected and viewstack displays correct content
Workaround: Using the MX TabBar results in the correct behaviour for all tests.