When a condition is met, a cursor should appear in the text field

Show us your script. See blow how to post code on this forum.

Would it not be better to enable the text field rather than set its visibility?