fixing scrolling and insertion point on mouse click