old-docs-site icon indicating copy to clipboard operation
old-docs-site copied to clipboard

Update info on multiple scrolling views from app/2.0/toolbox/app-layout.md

Open frankiefu opened this issue 8 years ago • 3 comments

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 avatar Jun 06 '17 23:06 frankiefu

@frankiefu @keanulee

Would either of you be willing to write a code snippet showing how users should handle this?

ghost avatar Jun 07 '17 19:06 ghost

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.

frankiefu avatar Jun 08 '17 20:06 frankiefu

Thanks Frankie. I can massage that into something that fits, e.g., starter kit, which should make sense to many users.

arthurevans avatar Jun 08 '17 21:06 arthurevans