Skip to content

scrollBehavior should allow configuring scrolling element #2777

Closed
@phouri

Description

@phouri

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions