maintain cursor position between view switching