Steps to reproduce:
1.Run attached file
2.Tab to set focus on the Scroller
3.Use PageUp/Down to navigate
Actual Results:
Buttons behavior is reverse
Expected Results:
Workaround (if any):
SDK-17143 - Scroller Keyboard navigation is incorrect if viewport is DataGroup
PageUp/Down keys appear to work in reverse.
This is an unusual case: the Scroller's viewport (a VGroup) that
contains just one item, a DataGroup/VerticalLayout with 26 items.
Presently Vertical,HorizontalLayout don't handle this special case.
This bug report also exposes a similar problem with this special
case in inView(). If there's only one item in the layout, and
it doesn't fit within the ScrollR, then inView should always
return < 1.0.
public function mixItemRendererFunction(item:*):IFactory
{
if (item is DisplayObject || item is GraphicElement)
return new ClassFactory(DefaultComplexItemRenderer);
else
return new ClassFactory(DefaultItemRenderer);
}
private function createDP():void
{
dgroup.dataProvider = new ArrayCollection(['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']);
}
Hans Muller - [10/02/08 10:45 AM ]
<?xml version="1.0" encoding="utf-8"?>
<!--
http://bugs.adobe.com/jira/browse/SDK-17143SDK-17143 - Scroller Keyboard navigation is incorrect if viewport is DataGroup
PageUp/Down keys appear to work in reverse.
This is an unusual case: the Scroller's viewport (a VGroup) that
contains just one item, a DataGroup/VerticalLayout with 26 items.
Presently Vertical,HorizontalLayout don't handle this special case.
This bug report also exposes a similar problem with this special
case in inView(). If there's only one item in the layout, and
it doesn't fit within the ScrollR, then inView should always
return < 1.0.
-->
<Application
xmlns="http://ns.adobe.com/mxml/2009">
<layout>
<HorizontalLayout/>
</layout>
<Script>
<![CDATA[
import flex.skin.DefaultItemRenderer;
import flex.skin.DefaultComplexItemRenderer;
import mx.collections.ArrayCollection;
import flash.display.DisplayObject;
import flex.graphics.graphicsClasses.GraphicElement;
public function mixItemRendererFunction(item:*):IFactory
{
if (item is DisplayObject || item is GraphicElement)
return new ClassFactory(DefaultComplexItemRenderer);
else
return new ClassFactory(DefaultItemRenderer);
}
private function createDP():void
{
dgroup.dataProvider = new ArrayCollection(['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']);
}
]]>
</Script>
<Scroller height="200">
<VGroup>
<DataGroup id="dgroup"
creationComplete="createDP()"
itemRendererFunction="mixItemRendererFunction">
<layout>
<VerticalLayout/>
</layout>
</DataGroup>
</VGroup>
</Scroller>
</Application>
That is the intended behavior. There's only one item after all, so moving one line up or down is a special case. Conflating it with page up/down seems reasonable to me.
Hans Muller - [10/06/08 10:16 AM ]
That is the intended behavior. There's only one item after all, so moving one line up or down is a special case. Conflating it with page up/down seems reasonable to me.
<!--
http://bugs.adobe.com/jira/browse/SDK-17143
SDK-17143- Scroller Keyboard navigation is incorrect if viewport is DataGroupPageUp/Down keys appear to work in reverse.
This is an unusual case: the Scroller's viewport (a VGroup) that
contains just one item, a DataGroup/VerticalLayout with 26 items.
Presently Vertical,HorizontalLayout don't handle this special case.
This bug report also exposes a similar problem with this special
case in inView(). If there's only one item in the layout, and
it doesn't fit within the ScrollR, then inView should always
return < 1.0.
-->
<Application
xmlns="http://ns.adobe.com/mxml/2009">
<layout>
<HorizontalLayout/>
</layout>
<Script>
<![CDATA[
import flex.skin.DefaultItemRenderer;
import flex.skin.DefaultComplexItemRenderer;
import mx.collections.ArrayCollection;
import flash.display.DisplayObject;
import flex.graphics.graphicsClasses.GraphicElement;
public function mixItemRendererFunction(item:*):IFactory
{
if (item is DisplayObject || item is GraphicElement)
return new ClassFactory(DefaultComplexItemRenderer);
else
return new ClassFactory(DefaultItemRenderer);
}
private function createDP():void
{
dgroup.dataProvider = new ArrayCollection(['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']);
}
]]>
</Script>
<Scroller height="200">
<VGroup>
<DataGroup id="dgroup"
creationComplete="createDP()"
itemRendererFunction="mixItemRendererFunction">
<layout>
<VerticalLayout/>
</layout>
</DataGroup>
</VGroup>
</Scroller>
</Application>