Added delegate support to handle "text should end editing".