I hate being the bearer of bad news, but you cannot stop re-rendering with ember if you switch to another part of the application. If it is no longer visible, the elements have been removed from the DOM and no longer exist.
I solved this problem in my applications using jQuery to get the scroll position of a page or object. jQuery Scroll Up . I did what I had a place on the model that kept the scroll position. Then I looked like something
didInsertElement: function() { //Restore previous scroll position $('#item').scrollTop( this.get('model.scrollPosition') ); /* or on older ember builds `this.getPath('model.scrollPosition')` */ //Update the model with new scroll position when user scrolls var _self = this; $('#item').scroll(function(e){ _self.get('model').set('scrollPosition', $(this).scrollTop()); }); }
The key conclusion here is that the views should re-render. This does not stop. Your job as a developer is to save all the state you need to view (scroll position, item with focus, etc.) so that it can be restored. Ember gives you the tools to do this.
source share