Skip to content

Non simultaneous scrolling with two different containers #476

@GMolini

Description

@GMolini

So,

I have a component in which I use the scrollTo function. This component has a main div with a dynamic id, and inside it has a div with a fixed id

<div :id="`document_${_uid}`">
 <div id="page-container">

This component gets instanced twice, as it is behind a b-tabs (its in two tabs). Im calling the $scrollTo function with the following options:

    const scrollOptions = {
      container: `#document_${this._uid} #page-container`,
      offset: -20,
    };

Weirdly, the scrolling function works fine for the first instance, but not when I change the tab and try scrolling on the second. Any idea why this is happening?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions