Fixed a bug with lists that display only two visible items

This commit is contained in:
Nathan Dinsmore 2014-05-30 14:14:08 -04:00
parent 8c0a53054a
commit b66fd78b20

View file

@ -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);
}