fixed flashing issue on text inputs (except for extreme cases)