File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -67,4 +67,9 @@ public class ListCell extends Sprite {
6767 addChild (tf);
6868 }
6969
70+ public function select ():void {
71+ stage . focus = tf;
72+ tf. setSelection (0 , tf. getLineLength (0 ));
73+ }
74+
7075}}
Original file line number Diff line number Diff line change @@ -523,14 +523,14 @@ public class ListWatcher extends Sprite {
523523 if (cell. tf == cellContents) {
524524 e. preventDefault ();
525525 if (contents. length < 2 ) return ; // only one cell, and it's already selected
526- if (( i + 1 ) < visibleCells. length ) {
527- stage . focus = visibleCells[ i + 1 ];
526+ if (i + 1 < visibleCells. length ) {
527+ visibleCells[ i + 1 ] . select() ;
528528 return ;
529529 } else {
530530 var selectIndex: int = (firstVisibleIndex + i + 1 ) % contents. length ;
531531 scrollToIndex (selectIndex);
532532 var j: int = firstVisibleIndex - selectIndex;
533- if (( j >= 0 ) && ( j < visibleCells. length )) stage . focus = visibleCells[ j];
533+ if (j >= 0 && j < visibleCells. length ) visibleCells[ j] . select() ;
534534 }
535535 }
536536 }
You can’t perform that action at this time.
0 commit comments