Changed modal to submit whenever focus is lost