Where do you get the magic number 50? Wouldn't it be more reliable to check for the visibility of the second text field?