If the selection point is outside the visible area, the text box will scroll to show the part where the selection point is located. So calling setSelectionPointPosition(0) will always make the scrollbar go completely to the top.