make caret go to start of document after opening