keep search caret in position when changing search field