stay on doc when switching view