Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scrollBehavior should allow configuring scrolling element #2777

Closed
phouri opened this issue May 22, 2019 · 1 comment · May be fixed by #2780
Closed

scrollBehavior should allow configuring scrolling element #2777

phouri opened this issue May 22, 2019 · 1 comment · May be fixed by #2780

Comments

@phouri
Copy link

phouri commented May 22, 2019

What problem does this feature solve?

A lot of times - the scrolling element in the document is not the window, making scrollBehavior not work (and the saved position too probably).

Should allow setting the scrolling element in the application (not sure if as a global, or per scrollBehavior function or both).

What does the proposed API look like?

Global Option:

When initiating Vue router - allow setting scrollingElement property that will replace window.

Per Scroll Behavior Option:

When returning the scroll object should allow to set scrollingElement that will override the window (or the global config).

savedPosition should always be related to the global config (or window).

@posva
Copy link
Member

posva commented May 22, 2019

Duplicate of #1187

@posva posva marked this as a duplicate of #1187 May 22, 2019
@posva posva closed this as completed May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants