Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

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

Open
frankiefu opened this issue Jun 6, 2017 · 3 comments
Assignees

Comments

@frankiefu
Copy link
Member

From Polymer/polymer#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.

@ghost
Copy link

ghost commented Jun 7, 2017

@frankiefu @keanulee

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

@frankiefu
Copy link
Member Author

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.

@arthurevans
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants