setCaretForSearchFieldOnPosition method