mirror of
https://github.com/scratchfoundation/scratch-flash.git
synced 2024-12-04 21:21:06 -05:00
Fixed a bug with lists that display only two visible items
This commit is contained in:
parent
8c0a53054a
commit
b66fd78b20
1 changed files with 3 additions and 2 deletions
|
@ -84,12 +84,13 @@ public class ListCell extends Sprite {
|
|||
public function select():void {
|
||||
stage.focus = tf;
|
||||
tf.setSelection(0, tf.text.length);
|
||||
if (tf.type == 'input') addDeleteButton();
|
||||
}
|
||||
|
||||
private function focusChange(e:FocusEvent):void {
|
||||
var hasFocus:Boolean = (e.type == FocusEvent.FOCUS_IN);
|
||||
var hasFocus:Boolean = e.type == FocusEvent.FOCUS_IN;
|
||||
frame.setColor(hasFocus ? focusedColor : normalColor);
|
||||
tf.textColor = (hasFocus ? 0 : 0xFFFFFF);
|
||||
tf.textColor = hasFocus ? 0 : 0xFFFFFF;
|
||||
setTimeout(hasFocus && tf.type == 'input' ? addDeleteButton : removeDeleteButton, 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue