better logic for keeping text field visible.