Seperated on_tab functionality from rest of text_entered method.