Skip to content

Support parent container for scroll behavior #1249

@erguotou520

Description

@erguotou520

Feature request?

VueRouter use window.scrollTo to do scroll, but in some case, the scroll container may be not the body, is that possible to support custom scroll parent like:

scrollBehavior () {
  return { container: 'container-selector', x: 0, y: 0 }
}

For realization, update window.scrollTo to $container.scrollTop = position.y; $container.scrollLeft = position.x

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