schlot

When switching between mobile/Views in dojo, can I retain the scroll position?

Discussion created by schlot on Mar 7, 2014
I have mobile project based on Dojo which has two dojox/mobile/Views, one that is a list and one that is a map.  The list contains several features in it and when the user clicks on the Map It button for that item, they're taken to a map where that feature is located.  At the top of the View for the map, I have a back button, which will take them to the original View containing the list.

<div id="backButton" data-dojo-type="dojox/mobile/ToolBarButton" style="float: right;" moveTo="mainView">Back</div>


I'd really like to be able to retain the position in the list where the user was before they viewed the map, but moving to mainView resets itself to the top of the list again.  Is there any way to scroll back to the item they were on previously?

http://jsfiddle.net/schlot/7t8Lu/3/

Outcomes