You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Chris Velevitch <ch...@gmail.com> on 2015/09/16 08:10:30 UTC

Lists with focusable children problem

I have a spark List with hasFocusableChildren is true and a custom renderer
that has a TextInput field. I set focus to a row and then start tabbing
through the list, when it gets to the last visible row, the next tab causes
focus to leave the List. How do I get the list to scroll into view the next
row? The same thing also happens when shift-tabbing backup the list and the
very first row is not currently visible.

Attached is some code that demonstrates the problem.


Chris
--
Chris Velevitch
Manager - Adobe Developers & Designers, Sydney
m: 0415 469 095

Adobe Developers & Designers, Sydney
Topic: Lucee
Date: Mon, 28th September
Details and RSVP on http://www.meetup.com/Adobe-developers-designers-sydney/

Re: Lists with focusable children problem

Posted by Alex Harui <ah...@adobe.com>.
I did not find a JIRA issue.  Go ahead and file one, but don’t hold your
breath waiting for it.  I still think a single column DG would work as
well.

I haven’t looked at this attempt at a solution in detail, but by using
hasFocusableChildren, you are going down the path of turning the List into
a Container of focusable children, whereas DG is the only focusable
control and distributes focus within itself to the right renderer.  It
might affect the UX where the user clicks away and tabs back in.  IIRC,
the DG will return focus to the last edited renderer.  Also, if no
renderers are in an edit session, I think DG will take focus so arrow keys
navigate the rows.

-Alex

On 9/17/15, 5:37 PM, "Chris Velevitch" <ch...@gmail.com> wrote:

>useVirtualLayout=false does not perform very well for lists over 800.
>
>I ended up modifying your focusIn handler to this:-
>
>if (event.shiftKey)
>     theList.ensureIndexIsVisible(itemIndex-1)
>else
>     theList.ensureIndexIsVisible(itemIndex+1);
>
>Thanks for your help.
>
>@Alex, do you know if there is a ticket number for this issue?
>
>
>On Thu, Sep 17, 2015 at 7:35 PM, Marcus Fritze
><marcus.fritze@googlemail.com
>> wrote:
>
>> Thanks Alex for the suggestion useVirtualLayout=false . I didn’t know
>>that
>> (or I have forgotten this). :-)
>>
>> So I added this to the list and removed the +1 on itemIndex.
>>
>> Chris, be sure you use the correct tabIndex for the TextInput. I changed
>> this from data to itemIndex.
>> I used data in the old example, because you had numbers in the example.
>> But itemIndex is better,
>> so your data can be A,B,C,….
>>
>> This should work now.
>>
>> Updated code:
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>>   xmlns:s="library://ns.adobe.com/flex/spark"
>>   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
>>minHeight="600"
>>   creationComplete="creationCompleteHandler(event)">
>> <fx:Declarations>
>> <!-- Platzieren Sie nichtvisuelle Elemente (z. B. Dienste, Wertobjekte)
>> hier -->
>> </fx:Declarations>
>>
>>
>> <fx:Script>
>> <![CDATA[
>> import mx.collections.ArrayList;
>> import mx.events.FlexEvent;
>>
>>
>> [Bindable]
>> private var values:ArrayList = new ArrayList();
>>
>>
>> private function creationCompleteHandler(event:FlexEvent):void
>> {
>> for (var i:int = 0; i < 100; i++)
>> values.addItem(String(i));
>> }
>> ]]>
>> </fx:Script>
>>
>>
>> <s:VGroup height="100%">
>> <s:Button label="Top of List" tabIndex="1"/>
>> <s:List id="editList" dataProvider="{values}" height="100%"
>> hasFocusableChildren="true" useVirtualLayout="false">
>> <s:itemRenderer>
>> <fx:Component>
>> <s:ItemRenderer>
>> <fx:Script>
>> <![CDATA[
>> import spark.components.List;
>>
>>
>> private function onFocusIn(event:FocusEvent):void
>> {
>> var list:List = this.owner as List;
>>
>>
>> list.ensureIndexIsVisible(itemIndex);
>> }
>>
>>
>> ]]>
>> </fx:Script>
>> <s:HGroup paddingLeft="4" verticalAlign="middle">
>> <s:Label text="{data}" width="30"/>
>> <s:TextInput text="{data}" tabEnabled="true"
>>focusIn="{onFocusIn(event)}"
>> tabIndex="{itemIndex+2}"/>
>> </s:HGroup>
>> </s:ItemRenderer>
>> </fx:Component>
>> </s:itemRenderer>
>> </s:List>
>> <s:Button label="Bottom of List" tabIndex="{values.length + 2}"/>
>> </s:VGroup>
>>
>>
>> </s:Application>
>>
>>
>>
>>
>> Am 17.09.2015 um 01:43 schrieb Chris Velevitch
>><chris.velevitch@gmail.com
>> >:
>>
>> Marcus's solution does work with my demonstration code, but when I
>>tried to
>> apply it to my production code, I'm still seeing the problem. So I need
>>to
>> look into why and how my production code (it uses states to switch item
>> renderers and some other differences) differs from my demonstration
>>code.
>>
>> Alex, I will keep your suggestions in mind in case I can't work it out.
>>
>> Is there a ticket open for updating the Spark List with those Spark
>> DataGrid code?
>>
>> On Thu, Sep 17, 2015 at 12:47 AM, Alex Harui <ah...@adobe.com> wrote:
>>
>> If you look at Spark DataGrid, there is a whole bunch of code added to
>> handle this.  I believe this code was never applied to Spark List.  Can
>>you
>> use a single-column DataGrid instead?  And if not, can you use a List
>>with
>> useVirtualLayout=false?
>>
>> -Alex
>>
>> From: Chris Velevitch <chris.velevitch@gmail.com<mailto:
>> chris.velevitch@gmail.com>>
>> Reply-To: "dev@flex.apache.org<mailto:dev@flex.apache.org
>> <de...@flex.apache.org>>" <
>> dev@flex.apache.org<mailto:dev@flex.apache.org <de...@flex.apache.org>>>
>> Date: Tuesday, September 15, 2015 at 11:10 PM
>> To: "dev@flex.apache.org<mailto:dev@flex.apache.org
>><de...@flex.apache.org>>"
>> <dev@flex.apache.org
>> <mailto:dev@flex.apache.org <de...@flex.apache.org>>>
>> Subject: Lists with focusable children problem
>>
>> I have a spark List with hasFocusableChildren is true and a custom
>> renderer that has a TextInput field. I set focus to a row and then start
>> tabbing through the list, when it gets to the last visible row, the next
>> tab causes focus to leave the List. How do I get the list to scroll into
>> view the next row? The same thing also happens when shift-tabbing backup
>> the list and the very first row is not currently visible.
>>
>> Attached is some code that demonstrates the problem.
>>
>>
>> Chris
>> --
>> Chris Velevitch
>> Manager - Adobe Developers & Designers, Sydney
>> m: 0415 469 095
>>
>> Adobe Developers & Designers, Sydney
>> Topic: Lucee
>> Date: Mon, 28th September
>> Details and RSVP on
>> http://www.meetup.com/Adobe-developers-designers-sydney/
>>
>>
>>
>>
>> --
>>
>>
>> Chris
>> --
>> Chris Velevitch
>> Manager - Adobe Developers & Designers, Sydney
>> m: 0415 469 095
>>
>> Adobe Developers & Designers, Sydney
>> Topic: Lucee
>> Date: Mon, 28th September
>> Details and RSVP on
>> http://www.meetup.com/Adobe-developers-designers-sydney/
>>
>>
>>
>
>
>-- 
>
>
>Chris
>--
>Chris Velevitch
>Manager - Adobe Developers & Designers, Sydney
>m: 0415 469 095
>
>Adobe Developers & Designers, Sydney
>Topic: Lucee
>Date: Mon, 28th September
>Details and RSVP on
>http://www.meetup.com/Adobe-developers-designers-sydney/


Re: Lists with focusable children problem

Posted by Chris Velevitch <ch...@gmail.com>.
useVirtualLayout=false does not perform very well for lists over 800.

I ended up modifying your focusIn handler to this:-

if (event.shiftKey)
     theList.ensureIndexIsVisible(itemIndex-1)
else
     theList.ensureIndexIsVisible(itemIndex+1);

Thanks for your help.

@Alex, do you know if there is a ticket number for this issue?


On Thu, Sep 17, 2015 at 7:35 PM, Marcus Fritze <marcus.fritze@googlemail.com
> wrote:

> Thanks Alex for the suggestion useVirtualLayout=false . I didn’t know that
> (or I have forgotten this). :-)
>
> So I added this to the list and removed the +1 on itemIndex.
>
> Chris, be sure you use the correct tabIndex for the TextInput. I changed
> this from data to itemIndex.
> I used data in the old example, because you had numbers in the example.
> But itemIndex is better,
> so your data can be A,B,C,….
>
> This should work now.
>
> Updated code:
>
> <?xml version="1.0" encoding="utf-8"?>
> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>   xmlns:s="library://ns.adobe.com/flex/spark"
>   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
>   creationComplete="creationCompleteHandler(event)">
> <fx:Declarations>
> <!-- Platzieren Sie nichtvisuelle Elemente (z. B. Dienste, Wertobjekte)
> hier -->
> </fx:Declarations>
>
>
> <fx:Script>
> <![CDATA[
> import mx.collections.ArrayList;
> import mx.events.FlexEvent;
>
>
> [Bindable]
> private var values:ArrayList = new ArrayList();
>
>
> private function creationCompleteHandler(event:FlexEvent):void
> {
> for (var i:int = 0; i < 100; i++)
> values.addItem(String(i));
> }
> ]]>
> </fx:Script>
>
>
> <s:VGroup height="100%">
> <s:Button label="Top of List" tabIndex="1"/>
> <s:List id="editList" dataProvider="{values}" height="100%"
> hasFocusableChildren="true" useVirtualLayout="false">
> <s:itemRenderer>
> <fx:Component>
> <s:ItemRenderer>
> <fx:Script>
> <![CDATA[
> import spark.components.List;
>
>
> private function onFocusIn(event:FocusEvent):void
> {
> var list:List = this.owner as List;
>
>
> list.ensureIndexIsVisible(itemIndex);
> }
>
>
> ]]>
> </fx:Script>
> <s:HGroup paddingLeft="4" verticalAlign="middle">
> <s:Label text="{data}" width="30"/>
> <s:TextInput text="{data}" tabEnabled="true" focusIn="{onFocusIn(event)}"
> tabIndex="{itemIndex+2}"/>
> </s:HGroup>
> </s:ItemRenderer>
> </fx:Component>
> </s:itemRenderer>
> </s:List>
> <s:Button label="Bottom of List" tabIndex="{values.length + 2}"/>
> </s:VGroup>
>
>
> </s:Application>
>
>
>
>
> Am 17.09.2015 um 01:43 schrieb Chris Velevitch <chris.velevitch@gmail.com
> >:
>
> Marcus's solution does work with my demonstration code, but when I tried to
> apply it to my production code, I'm still seeing the problem. So I need to
> look into why and how my production code (it uses states to switch item
> renderers and some other differences) differs from my demonstration code.
>
> Alex, I will keep your suggestions in mind in case I can't work it out.
>
> Is there a ticket open for updating the Spark List with those Spark
> DataGrid code?
>
> On Thu, Sep 17, 2015 at 12:47 AM, Alex Harui <ah...@adobe.com> wrote:
>
> If you look at Spark DataGrid, there is a whole bunch of code added to
> handle this.  I believe this code was never applied to Spark List.  Can you
> use a single-column DataGrid instead?  And if not, can you use a List with
> useVirtualLayout=false?
>
> -Alex
>
> From: Chris Velevitch <chris.velevitch@gmail.com<mailto:
> chris.velevitch@gmail.com>>
> Reply-To: "dev@flex.apache.org<mailto:dev@flex.apache.org
> <de...@flex.apache.org>>" <
> dev@flex.apache.org<mailto:dev@flex.apache.org <de...@flex.apache.org>>>
> Date: Tuesday, September 15, 2015 at 11:10 PM
> To: "dev@flex.apache.org<mailto:dev@flex.apache.org <de...@flex.apache.org>>"
> <dev@flex.apache.org
> <mailto:dev@flex.apache.org <de...@flex.apache.org>>>
> Subject: Lists with focusable children problem
>
> I have a spark List with hasFocusableChildren is true and a custom
> renderer that has a TextInput field. I set focus to a row and then start
> tabbing through the list, when it gets to the last visible row, the next
> tab causes focus to leave the List. How do I get the list to scroll into
> view the next row? The same thing also happens when shift-tabbing backup
> the list and the very first row is not currently visible.
>
> Attached is some code that demonstrates the problem.
>
>
> Chris
> --
> Chris Velevitch
> Manager - Adobe Developers & Designers, Sydney
> m: 0415 469 095
>
> Adobe Developers & Designers, Sydney
> Topic: Lucee
> Date: Mon, 28th September
> Details and RSVP on
> http://www.meetup.com/Adobe-developers-designers-sydney/
>
>
>
>
> --
>
>
> Chris
> --
> Chris Velevitch
> Manager - Adobe Developers & Designers, Sydney
> m: 0415 469 095
>
> Adobe Developers & Designers, Sydney
> Topic: Lucee
> Date: Mon, 28th September
> Details and RSVP on
> http://www.meetup.com/Adobe-developers-designers-sydney/
>
>
>


-- 


Chris
--
Chris Velevitch
Manager - Adobe Developers & Designers, Sydney
m: 0415 469 095

Adobe Developers & Designers, Sydney
Topic: Lucee
Date: Mon, 28th September
Details and RSVP on http://www.meetup.com/Adobe-developers-designers-sydney/

Re: Lists with focusable children problem

Posted by Marcus Fritze <ma...@googlemail.com>.
Thanks Alex for the suggestion useVirtualLayout=false . I didn’t know that (or I have forgotten this). :-)

So I added this to the list and removed the +1 on itemIndex.

Chris, be sure you use the correct tabIndex for the TextInput. I changed this from data to itemIndex.
I used data in the old example, because you had numbers in the example. But itemIndex is better,
so your data can be A,B,C,….

This should work now.

Updated code:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
			   xmlns:s="library://ns.adobe.com/flex/spark"
			   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
			   creationComplete="creationCompleteHandler(event)">
	<fx:Declarations>
		<!-- Platzieren Sie nichtvisuelle Elemente (z. B. Dienste, Wertobjekte) hier -->
	</fx:Declarations>

	<fx:Script>
		<![CDATA[
			import mx.collections.ArrayList;
			import mx.events.FlexEvent;

			[Bindable]
			private var values:ArrayList = new ArrayList();

			private function creationCompleteHandler(event:FlexEvent):void
			{
				for (var i:int = 0; i < 100; i++)
					values.addItem(String(i));
			}
		]]>
	</fx:Script>

	<s:VGroup height="100%">
		<s:Button label="Top of List" tabIndex="1"/>
		<s:List id="editList" dataProvider="{values}" height="100%" hasFocusableChildren="true" useVirtualLayout="false">
			<s:itemRenderer>
				<fx:Component>
					<s:ItemRenderer>
						<fx:Script>
							<![CDATA[
								import spark.components.List;

								private function onFocusIn(event:FocusEvent):void
								{
									var list:List	= this.owner as List;

									list.ensureIndexIsVisible(itemIndex);
								}

							]]>
						</fx:Script>
						<s:HGroup paddingLeft="4" verticalAlign="middle">
							<s:Label		text="{data}" width="30"/>
							<s:TextInput	text="{data}" tabEnabled="true" focusIn="{onFocusIn(event)}" tabIndex="{itemIndex+2}"/>
						</s:HGroup>
					</s:ItemRenderer>
				</fx:Component>
			</s:itemRenderer>
		</s:List>
		<s:Button label="Bottom of List" tabIndex="{values.length + 2}"/>
	</s:VGroup>

</s:Application>




> Am 17.09.2015 um 01:43 schrieb Chris Velevitch <ch...@gmail.com>:
> 
> Marcus's solution does work with my demonstration code, but when I tried to
> apply it to my production code, I'm still seeing the problem. So I need to
> look into why and how my production code (it uses states to switch item
> renderers and some other differences) differs from my demonstration code.
> 
> Alex, I will keep your suggestions in mind in case I can't work it out.
> 
> Is there a ticket open for updating the Spark List with those Spark
> DataGrid code?
> 
> On Thu, Sep 17, 2015 at 12:47 AM, Alex Harui <ah...@adobe.com> wrote:
> 
>> If you look at Spark DataGrid, there is a whole bunch of code added to
>> handle this.  I believe this code was never applied to Spark List.  Can you
>> use a single-column DataGrid instead?  And if not, can you use a List with
>> useVirtualLayout=false?
>> 
>> -Alex
>> 
>> From: Chris Velevitch <chris.velevitch@gmail.com<mailto:
>> chris.velevitch@gmail.com>>
>> Reply-To: "dev@flex.apache.org<ma...@flex.apache.org>" <
>> dev@flex.apache.org<ma...@flex.apache.org>>
>> Date: Tuesday, September 15, 2015 at 11:10 PM
>> To: "dev@flex.apache.org<ma...@flex.apache.org>" <dev@flex.apache.org
>> <ma...@flex.apache.org>>
>> Subject: Lists with focusable children problem
>> 
>> I have a spark List with hasFocusableChildren is true and a custom
>> renderer that has a TextInput field. I set focus to a row and then start
>> tabbing through the list, when it gets to the last visible row, the next
>> tab causes focus to leave the List. How do I get the list to scroll into
>> view the next row? The same thing also happens when shift-tabbing backup
>> the list and the very first row is not currently visible.
>> 
>> Attached is some code that demonstrates the problem.
>> 
>> 
>> Chris
>> --
>> Chris Velevitch
>> Manager - Adobe Developers & Designers, Sydney
>> m: 0415 469 095
>> 
>> Adobe Developers & Designers, Sydney
>> Topic: Lucee
>> Date: Mon, 28th September
>> Details and RSVP on
>> http://www.meetup.com/Adobe-developers-designers-sydney/
>> 
> 
> 
> 
> --
> 
> 
> Chris
> --
> Chris Velevitch
> Manager - Adobe Developers & Designers, Sydney
> m: 0415 469 095
> 
> Adobe Developers & Designers, Sydney
> Topic: Lucee
> Date: Mon, 28th September
> Details and RSVP on http://www.meetup.com/Adobe-developers-designers-sydney/


Re: Lists with focusable children problem

Posted by Chris Velevitch <ch...@gmail.com>.
Marcus's solution does work with my demonstration code, but when I tried to
apply it to my production code, I'm still seeing the problem. So I need to
look into why and how my production code (it uses states to switch item
renderers and some other differences) differs from my demonstration code.

Alex, I will keep your suggestions in mind in case I can't work it out.

Is there a ticket open for updating the Spark List with those Spark
DataGrid code?

On Thu, Sep 17, 2015 at 12:47 AM, Alex Harui <ah...@adobe.com> wrote:

> If you look at Spark DataGrid, there is a whole bunch of code added to
> handle this.  I believe this code was never applied to Spark List.  Can you
> use a single-column DataGrid instead?  And if not, can you use a List with
> useVirtualLayout=false?
>
> -Alex
>
> From: Chris Velevitch <chris.velevitch@gmail.com<mailto:
> chris.velevitch@gmail.com>>
> Reply-To: "dev@flex.apache.org<ma...@flex.apache.org>" <
> dev@flex.apache.org<ma...@flex.apache.org>>
> Date: Tuesday, September 15, 2015 at 11:10 PM
> To: "dev@flex.apache.org<ma...@flex.apache.org>" <dev@flex.apache.org
> <ma...@flex.apache.org>>
> Subject: Lists with focusable children problem
>
> I have a spark List with hasFocusableChildren is true and a custom
> renderer that has a TextInput field. I set focus to a row and then start
> tabbing through the list, when it gets to the last visible row, the next
> tab causes focus to leave the List. How do I get the list to scroll into
> view the next row? The same thing also happens when shift-tabbing backup
> the list and the very first row is not currently visible.
>
> Attached is some code that demonstrates the problem.
>
>
> Chris
> --
> Chris Velevitch
> Manager - Adobe Developers & Designers, Sydney
> m: 0415 469 095
>
> Adobe Developers & Designers, Sydney
> Topic: Lucee
> Date: Mon, 28th September
> Details and RSVP on
> http://www.meetup.com/Adobe-developers-designers-sydney/
>



-- 


Chris
--
Chris Velevitch
Manager - Adobe Developers & Designers, Sydney
m: 0415 469 095

Adobe Developers & Designers, Sydney
Topic: Lucee
Date: Mon, 28th September
Details and RSVP on http://www.meetup.com/Adobe-developers-designers-sydney/

Re: Lists with focusable children problem

Posted by Alex Harui <ah...@adobe.com>.
If you look at Spark DataGrid, there is a whole bunch of code added to handle this.  I believe this code was never applied to Spark List.  Can you use a single-column DataGrid instead?  And if not, can you use a List with useVirtualLayout=false?

-Alex

From: Chris Velevitch <ch...@gmail.com>>
Reply-To: "dev@flex.apache.org<ma...@flex.apache.org>" <de...@flex.apache.org>>
Date: Tuesday, September 15, 2015 at 11:10 PM
To: "dev@flex.apache.org<ma...@flex.apache.org>" <de...@flex.apache.org>>
Subject: Lists with focusable children problem

I have a spark List with hasFocusableChildren is true and a custom renderer that has a TextInput field. I set focus to a row and then start tabbing through the list, when it gets to the last visible row, the next tab causes focus to leave the List. How do I get the list to scroll into view the next row? The same thing also happens when shift-tabbing backup the list and the very first row is not currently visible.

Attached is some code that demonstrates the problem.


Chris
--
Chris Velevitch
Manager - Adobe Developers & Designers, Sydney
m: 0415 469 095

Adobe Developers & Designers, Sydney
Topic: Lucee
Date: Mon, 28th September
Details and RSVP on http://www.meetup.com/Adobe-developers-designers-sydney/

Re: Lists with focusable children problem

Posted by Marcus Fritze <ma...@googlemail.com>.
The problem is, that the ItemRenderer which is not visible, actually not exists.

This works for tab down. I think you can solve this for tab up (shift + tab).



<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
			   xmlns:s="library://ns.adobe.com/flex/spark"
			   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
			   creationComplete="creationCompleteHandler(event)">
	<fx:Declarations>
		<!-- Platzieren Sie nichtvisuelle Elemente (z. B. Dienste, Wertobjekte) hier -->
	</fx:Declarations>

	<fx:Script>
		<![CDATA[
			import mx.collections.ArrayList;
			import mx.events.FlexEvent;

			[Bindable]
			private var values:ArrayList = new ArrayList();

			private function creationCompleteHandler(event:FlexEvent):void
			{
				for (var i:int = 0; i < 100; i++)
					values.addItem(String(i));
			}
		]]>
	</fx:Script>

	<s:VGroup height="100%">
		<s:Button label="Top of List"/>
		<s:List id="editList" dataProvider="{values}" height="100%" hasFocusableChildren="true">
			<s:itemRenderer>
				<fx:Component>
					<s:ItemRenderer>
						<fx:Script>
							<![CDATA[
								import spark.components.List;

								private function onFocusIn(event:FocusEvent):void
								{
									var list:List	= this.owner as List;

									list.ensureIndexIsVisible(itemIndex+1);
								}

							]]>
						</fx:Script>
						<s:HGroup paddingLeft="4" verticalAlign="middle">
							<s:Label		text="{data}" width="30"/>
							<s:TextInput	text="{data}" tabEnabled="true" focusIn="{onFocusIn(event)}" tabIndex="{data}"/>
						</s:HGroup>
					</s:ItemRenderer>
				</fx:Component>
			</s:itemRenderer>
		</s:List>
		<s:Button label="Bottom of List" tabIndex="{values.length + 1}"/>
	</s:VGroup>

</s:Application>





> Am 16.09.2015 um 09:18 schrieb Chris Velevitch <ch...@gmail.com>:
> 
> I had tried that and it still loses focus. It does scroll a couple of rows,
> but still loses focus before getting to the last record in the dataProvider.
> 
> On Wed, Sep 16, 2015 at 5:06 PM, Marcus Fritze <marcus.fritze@googlemail.com
>> wrote:
> 
>> Hi Chris,
>> 
>> in the TextInput I would add a function for the event focusIn. In this
>> function I would use list.ensureIsVisible(<indexNr of the row>).
>> 
>> Greetings
>> 
>> Marcus
>> 
>> Am 16.09.2015 um 08:10 schrieb Chris Velevitch <chris.velevitch@gmail.com
>>> :
>> 
>> I have a spark List with hasFocusableChildren is true and a custom
>> renderer that has a TextInput field. I set focus to a row and then start
>> tabbing through the list, when it gets to the last visible row, the next
>> tab causes focus to leave the List. How do I get the list to scroll into
>> view the next row? The same thing also happens when shift-tabbing backup
>> the list and the very first row is not currently visible.
>> 
>> Attached is some code that demonstrates the problem.
>> 
>> 
>> Chris
>> --
>> Chris Velevitch
>> Manager - Adobe Developers & Designers, Sydney
>> m: 0415 469 095
>> 
>> Adobe Developers & Designers, Sydney
>> Topic: Lucee
>> Date: Mon, 28th September
>> Details and RSVP on
>> http://www.meetup.com/Adobe-developers-designers-sydney/
>> <Main.mxml>
>> 
>> 
>> 
> 
> 
> --
> 
> 
> Chris
> --
> Chris Velevitch
> Manager - Adobe Developers & Designers, Sydney
> m: 0415 469 095
> 
> Adobe Developers & Designers, Sydney
> Topic: Lucee
> Date: Mon, 28th September
> Details and RSVP on http://www.meetup.com/Adobe-developers-designers-sydney/


Re: Lists with focusable children problem

Posted by Chris Velevitch <ch...@gmail.com>.
I had tried that and it still loses focus. It does scroll a couple of rows,
but still loses focus before getting to the last record in the dataProvider.

On Wed, Sep 16, 2015 at 5:06 PM, Marcus Fritze <marcus.fritze@googlemail.com
> wrote:

> Hi Chris,
>
> in the TextInput I would add a function for the event focusIn. In this
> function I would use list.ensureIsVisible(<indexNr of the row>).
>
> Greetings
>
> Marcus
>
> Am 16.09.2015 um 08:10 schrieb Chris Velevitch <chris.velevitch@gmail.com
> >:
>
> I have a spark List with hasFocusableChildren is true and a custom
> renderer that has a TextInput field. I set focus to a row and then start
> tabbing through the list, when it gets to the last visible row, the next
> tab causes focus to leave the List. How do I get the list to scroll into
> view the next row? The same thing also happens when shift-tabbing backup
> the list and the very first row is not currently visible.
>
> Attached is some code that demonstrates the problem.
>
>
> Chris
> --
> Chris Velevitch
> Manager - Adobe Developers & Designers, Sydney
> m: 0415 469 095
>
> Adobe Developers & Designers, Sydney
> Topic: Lucee
> Date: Mon, 28th September
> Details and RSVP on
> http://www.meetup.com/Adobe-developers-designers-sydney/
> <Main.mxml>
>
>
>


-- 


Chris
--
Chris Velevitch
Manager - Adobe Developers & Designers, Sydney
m: 0415 469 095

Adobe Developers & Designers, Sydney
Topic: Lucee
Date: Mon, 28th September
Details and RSVP on http://www.meetup.com/Adobe-developers-designers-sydney/

Re: Lists with focusable children problem

Posted by Marcus Fritze <ma...@googlemail.com>.
Hi Chris,

in the TextInput I would add a function for the event focusIn. In this function I would use list.ensureIsVisible(<indexNr of the row>).

Greetings

Marcus

> Am 16.09.2015 um 08:10 schrieb Chris Velevitch <ch...@gmail.com>:
> 
> I have a spark List with hasFocusableChildren is true and a custom renderer that has a TextInput field. I set focus to a row and then start tabbing through the list, when it gets to the last visible row, the next tab causes focus to leave the List. How do I get the list to scroll into view the next row? The same thing also happens when shift-tabbing backup the list and the very first row is not currently visible.
> 
> Attached is some code that demonstrates the problem.
> 
> 
> Chris
> --
> Chris Velevitch
> Manager - Adobe Developers & Designers, Sydney
> m: 0415 469 095
> 
> Adobe Developers & Designers, Sydney
> Topic: Lucee
> Date: Mon, 28th September
> Details and RSVP on http://www.meetup.com/Adobe-developers-designers-sydney/ <http://www.meetup.com/Adobe-developers-designers-sydney/><Main.mxml>