File tree 2 files changed +8
-3
lines changed
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 {
67
67
addChild (tf);
68
68
}
69
69
70
+ public function select ():void {
71
+ stage . focus = tf;
72
+ tf. setSelection (0 , tf. getLineLength (0 ));
73
+ }
74
+
70
75
}}
Original file line number Diff line number Diff line change @@ -523,14 +523,14 @@ public class ListWatcher extends Sprite {
523
523
if (cell. tf == cellContents) {
524
524
e. preventDefault ();
525
525
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() ;
528
528
return ;
529
529
} else {
530
530
var selectIndex: int = (firstVisibleIndex + i + 1 ) % contents. length ;
531
531
scrollToIndex (selectIndex);
532
532
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() ;
534
534
}
535
535
}
536
536
}
You can’t perform that action at this time.
0 commit comments