call textinput before appending to avoid dom manip