old-docs-site
old-docs-site copied to clipboard
Update info on multiple scrolling views from app/2.0/toolbox/app-layout.md
From https://github.com/Polymer/polymer/issues/4664:
The 2.0 docs state:
Manage multiple scrolling views. If you're using something like
<iron-pages>to switch views, you can use<app-scroll-position>to track scroll position for each of the views. See the API docs for sample usage.<app-scroll-position>was renamed in release 2.0 (replacing<app-scrollpos-control>).
However, the link on <app-scroll-position> turns up a blank page. Looks like <app-scroll-position> has been removed.
The only suggested alternative is document.rootScroller, but that is just a proposal right now and hasn’t landed in any browsers.
@frankiefu @keanulee
Would either of you be willing to write a code snippet showing how users should handle this?
We updated Pesto template in app-layout with replacement code here: https://github.com/PolymerElements/app-layout/blob/master/templates/pesto/src/recipe-app.html#L234-L250
One caution is that works specifically for that template. But the idea of how one can store/retrieve scroll position should be more less the same.
Thanks Frankie. I can massage that into something that fits, e.g., starter kit, which should make sense to many users.