ensured caret is only visible in focussed window